|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
A model holding the Fixed Lexicon Multi-Word Expressions.
It uses the first word to index into a Map. As most first words for Fixed Lexicon MWEs are not normal English words they occur very infrequently except as part of the MWE. Therefore this algorithm is very fast only taking a single Hash Map lookup for words which do not start any MWE (the vast majority of words in any normal English text).
Method Summary | |
void |
addMWE(java.lang.String mweWords)
Adds a MWE to the model. |
java.lang.String[] |
getMWE(java.lang.String[] l,
int pos)
Finds the MWE (if any) at a position in the sequence of words. |
Method Detail |
public java.lang.String[] getMWE(java.lang.String[] l, int pos)
l
- An array of the words to be searched.pos
- The position in the array of the first word of the MWE.
null
then a MWE has not been found at that position,
else the longest MWE found at that position.public void addMWE(java.lang.String mweWords)
mweWords
- The space separated MWE to add to the model.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |