Menu

Commit [r814]  Maximize  Restore  History

Big commit: Creating Word._props and updating everything accordingly.

* Word._extra was removed in favor of Word._props, which
stores every prop (even "surface", "lemma", "pos" and "syn").
Python `property` objects were added to allow for code like
`w.surface = w.lemma` to continue working.

* Word.__init__ does not accept **kwargs arguments anymore,
but requires the initial `props` dict.

* The weird method Word.__len__ was renamed to Word.wc_length.

* Ngram.set_all was only used to replace entries by WILDCARD.
Since we will soon delete WILDCARD, Ngram.set_all was removed
and Ngram.foreach_del_prop was created in its place.

* We now treat most files as unable to produce empty props.
For example, `going||V|` in Moses will have no lemma or syn,
while we previously generated lemma="" and syn="".
In the future, we will issue warnings for files that CAN and
DO have empty word props.

* fmtutil.make_props was created as a temporary solution to the fact that
XWEFormatter generates tuples instead of `props` dicts. In the future,
this should be fixed.

* Similar to fmtutil.make_props, we have now a WILDCARD checker
inside Word.__init__. In the future, this should disappear, as
everyone should use fmtutil or something like it.

* File `candidates.py` had special code for still using
"surface if lemma is unavailable". Now that WILDCARDs are disappearing,
a bug has been fixed and we ARE actually generating surface outputs
if lemma is unavailable. Is this really the desired outcome?

silvioricardoc 2015-06-26

1 2 > >> (Page 1 of 2)
changed /bin/candidates.py
changed /bin/eval_automatic.py
changed /bin/libs/base/ngram.py
changed /bin/libs/base/word.py
changed /bin/libs/filetype/fmtutil.py
changed /bin/libs/filetype/ft_conll.py
changed /bin/libs/filetype/ft_moses.py
changed /bin/libs/filetype/ft_palavras.py
changed /bin/libs/filetype/ft_plaincandidates.py
changed /bin/libs/filetype/ft_plaincorpus.py
changed /bin/libs/filetype/ft_rasp.py
changed /bin/libs/filetype/ft_taggedplaincorpus.py
changed /bin/libs/filetype/ft_treetagger.py
changed /bin/libs/filetype/ft_xml.py
changed /bin/libs/filetype/indexlib.py
changed /bin/libs/filetype/patternlib.py
changed /bin/libs/util.py
changed /bin/localmaxs.py
changed /bin/uniq.py
changed /bin/wc.py
changed /test/convert/reference-output/corpus.moses.xml
changed /test/lang/english/childes/local-input/corpus.xml
changed /test/lang/english/childes/reference-output/corpus.xml
changed /test/lang/english/genia/reference-output/corpus.syn.corpus
changed /test/lang/english/genia/reference-output/corpus.syn.suffix
/bin/candidates.py Diff Switch to side-by-side view
Loading...
/bin/eval_automatic.py Diff Switch to side-by-side view
Loading...
/bin/libs/base/ngram.py Diff Switch to side-by-side view
Loading...
/bin/libs/base/word.py Diff Switch to side-by-side view
Loading...
/bin/libs/filetype/fmtutil.py Diff Switch to side-by-side view
Loading...
/bin/libs/filetype/ft_conll.py Diff Switch to side-by-side view
Loading...
/bin/libs/filetype/ft_moses.py Diff Switch to side-by-side view
Loading...
/bin/libs/filetype/ft_palavras.py Diff Switch to side-by-side view
Loading...
/bin/libs/filetype/ft_plaincandidates.py Diff Switch to side-by-side view
Loading...
/bin/libs/filetype/ft_plaincorpus.py Diff Switch to side-by-side view
Loading...
/bin/libs/filetype/ft_rasp.py Diff Switch to side-by-side view
Loading...
/bin/libs/filetype/ft_taggedplaincorpus.py Diff Switch to side-by-side view
Loading...
/bin/libs/filetype/ft_treetagger.py Diff Switch to side-by-side view
Loading...
/bin/libs/filetype/ft_xml.py Diff Switch to side-by-side view
Loading...
/bin/libs/filetype/indexlib.py Diff Switch to side-by-side view
Loading...
/bin/libs/filetype/patternlib.py Diff Switch to side-by-side view
Loading...
/bin/libs/util.py Diff Switch to side-by-side view
Loading...
/bin/localmaxs.py Diff Switch to side-by-side view
Loading...
/bin/uniq.py Diff Switch to side-by-side view
Loading...
/bin/wc.py Diff Switch to side-by-side view
Loading...
/test/convert/reference-output/corpus.moses.xml Diff Switch to side-by-side view
Loading...
/test/lang/english/childes/local-input/corpus.xml Diff Switch to side-by-side view
Loading...
/test/lang/english/childes/reference-output/corpus.xml Diff Switch to side-by-side view
Loading...
1 2 > >> (Page 1 of 2)
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.