Beispiel #1
0
    def pronouns(self):
        """ Prints out the pronoun statistics nicely. """
        if self.__pronouns == {}:
            self.__pronouns = Util.count_pronouns(self.tokens())

        template = "{0:12} {1:^12} {2:50}"
        print(template.format("Pronoun", "Frequency", "Type"))
        for k, v in self.__pronouns.items():
            print(template.format(k, v[0], v[1] + " " + v[2] + " (" + v[3] + ")"))

        return ''
Beispiel #2
0
    def pronouns(self):
        """ Prints out the pronoun statistics nicely. """
        if self.__pronouns == {}:
            self.__pronouns = Util.count_pronouns(self.tokens())

        template = "{0:12} {1:^12} {2:50}"
        print(template.format("Pronoun", "Frequency", "Type"))
        for k, v in self.__pronouns.items():
            print(
                template.format(k, v[0],
                                v[1] + " " + v[2] + " (" + v[3] + ")"))

        return ''
Beispiel #3
0
 def raw_pronouns(self):
     """ Returns the raw output of /splat/Util.count_pronouns(). """
     if self.__pronouns == {}:
         self.__pronouns = Util.count_pronouns(self.tokens())
     return self.__pronouns
Beispiel #4
0
 def raw_pronouns(self):
     """ Returns the raw output of /splat/Util.count_pronouns(). """
     if self.__pronouns == {}:
         self.__pronouns = Util.count_pronouns(self.tokens())
     return self.__pronouns