|
|
|
|
|
__init__(self,
devset_name='conll2000',
devset=None,
grammar='',
chunk_node='NP',
tagset=None)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature |
source code
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Inherited from object:
__delattr__,
__getattribute__,
__hash__,
__new__,
__reduce__,
__reduce_ex__,
__repr__,
__setattr__,
__str__
|
|
|
TAGSET = {'#': 'pound sign (currency marker)', '$': 'dollar si...
A dictionary mapping from part of speech tags to descriptions, which
is used in the help text.
|
|
|
HELP = [('Help', '20', 'Welcome to the regular expression chun...
Contents for the help box.
|
|
|
HELP_AUTOTAG = [('red', {'foreground': '#a00'}), ('green', {'f...
|
|
|
_EVAL_DELAY = 1
If the user has not pressed any key for this amount of time (in
seconds), and the current grammar has not been evaluated, then the
eval demon will evaluate it.
|
|
|
_EVAL_CHUNK = 15
The number of sentences that should be evaluated by the eval demon
each time it runs.
|
|
|
_EVAL_FREQ = 0.2
The frequency (in seconds) at which the eval demon is run
|
|
|
_EVAL_DEMON_MIN = 0.02
The minimum amount of time that the eval demon should take each time
it runs -- if it takes less than this time, _EVAL_CHUNK will be
modified upwards.
|
|
|
_EVAL_DEMON_MAX = 0.04
The maximum amount of time that the eval demon should take each time
it runs -- if it takes more than this time, _EVAL_CHUNK will be
modified downwards.
|
|
|
_GRAMMARBOX_PARAMS = {'background': '#efe', 'border': 2, 'heig...
|
|
|
_HELPBOX_PARAMS = {'background': '#efe', 'border': 2, 'foregro...
|
|
|
_DEVSETBOX_PARAMS = {'background': '#eef', 'border': 2, 'heigh...
|
|
|
_STATUS_PARAMS = {'background': '#9bb', 'border': 2, 'relief':...
|
|
|
_FONT_PARAMS = {'family': 'helvetica', 'size': -20}
|
|
|
_FRAME_PARAMS = {'background': '#777', 'border': 3, 'padx': 2,...
|
|
|
_EVALBOX_PARAMS = {'background': '#eef', 'border': 2, 'height'...
|
|
|
_BUTTON_PARAMS = {'activebackground': '#777', 'background': '#...
|
|
|
_HELPTAB_BG_COLOR = '#aba'
|
|
|
_HELPTAB_FG_COLOR = '#efe'
|
|
|
_HELPTAB_FG_PARAMS = {'background': '#efe'}
|
|
|
_HELPTAB_BG_PARAMS = {'background': '#aba'}
|
|
|
_HELPTAB_SPACER = 6
|
|
|
_SCALE_N = 5
|
|
|
_DRAW_LINES = False
|
|
|
_eval_demon_running = False
|
|
|
_showing_trace = False
|
|
|
SAVE_GRAMMAR_TEMPLATE = '# Regexp Chunk Parsing Grammar\n# Sav...
|
|
|
chunker
The chunker built from the grammar string
|
|
|
grammar
The unparsed grammar string
|
|
|
normalized_grammar
A normalized version of self.grammar.
|
|
|
grammar_changed
The last time() that the grammar was changed.
|
|
|
devset
The development set -- a list of chunked sentences.
|
|
|
devset_name
The name of the development set (for save files).
|
|
|
devset_index
The index into the development set of the first instance that's
currently being viewed.
|
|
|
_last_keypress
The time() when a key was most recently pressed
|
|
|
_history
A list of (grammar, precision, recall, fscore) tuples for grammars
that the user has already tried.
|
|
|
_history_index
When the user is scrolling through previous grammars, this is used to
keep track of which grammar they're looking at.
|
|
|
_eval_grammar
The grammar that is being currently evaluated by the eval demon.
|
|
|
_eval_normalized_grammar
A normalized copy of _eval_grammar.
|
|
|
_eval_index
The index of the next sentence in the development set that should be
looked at by the eval demon.
|
|
|
_eval_score
The ChunkScore object that's used to keep track of the
score of the current grammar on the development set.
|