INNER CODE UNIT · Python

Word

wyounas/homer · homer/analyzer.py:28

class Word(object):
    """
    An abstraction of a 'word'. It determines whether a word is a compulsive hedger, an intensifier or a vague word.

    The idea to look for compulsive hedgers, intensifiers and vague words came from the following works:
    - Steven Pinker's book `The Sense of Style: The Thinking Person's Guide to Writing in the 21st Century`.
    - https://litlab.stanford.edu/LiteraryLabPamphlet9.pdf
    """

    def __init__(self, word, intensifiers=INTENSIFIERS, compulsive_hedgers=COMPULSIVE_HEDGERS,
                 vague_words=VAGUE_WORDS):
        self.syllables = None
        self.word = word.strip().lower()
        self.intensifiers = intensifiers
        self.compulsive_hedgers = compulsive_hedgers
        self.vague_words = vague_words

    def is_and(self):

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…