index
module components.common_modules.tokens
AdjectiveToken
Token
class AdjectiveToken
Inherits from: Token

Public Functions

createAdjEvent(self, verbfeatures=None)
Processes the adjective after a copular verb and make it an event if the adjective has an event class.
feature_value(self, name)
Used by matchConstituent. Needs cases for all instance variables used in the pattern matching phase.
isAdjToken(self)

Private Functions

_conditionallyAddEvent(self)
Check whether there is an event class and add the event to self.tree if there is one. There is a sister of this method on Chunk.
class Token
Inherits from: Constituent

implements a single token.

Instance variables:
    text        -  the text string of the token
    pos         -  the part-of-speech of the token
    event       -  set to True if the token is wrapped in an EventTag
    event_tag   -  contains the EventTag

The event, eid and event are set at TarsqiTree creation for the daughters of
event tags.

Public Functions

__bool__(self)
__getitem__(self, index)
The method with the same name on Constituent made sure that we can view the Token as something that has elements. But here we add that Token has itself as its one daughter. This is used by update_event_checked_marker in the chunks module.
__init__(self, word, pos)
Initialize with the word and a part-of-speech, use defaults for all the other variables.
__str__(self)
createEvent(self, imported_events=None)
Do nothing when an AdjectiveToken or Token is asked to create an event. Potential adjectival events are processed from the VerbChunk using the createAdjEvent() method. Do not log a warning since it is normal for a Token to be asked this, without this method a method with the same name on Consituent would log a warning.
debug_string(self)
feature_value(self, name)
Used by matchConstituent. Needs cases for all instance variables used in the pattern matching phase.
getText(self)
Return the text of the token.
isMainVerb(self)
Return True if self is a main verb and False if not.
isPreposition(self)
Return True if self is a preposition and False if not. Note that this method returns False for the preposition in 'to the barn'.
isToken(self)
Returns True
pp(self)
pretty_print(self, indent=0)
module functions
token_class(pos)
Returns the class that is appropriate for the part-of-speech.