Interface MWEModel

All Known Implementing Classes:
FixedMWEModel, VariableMWEModel

public interface MWEModel

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).

$Revision: 1.1 $, $Date: 2002/03/12 12:51:20 $
Mike Atkinson

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)
Finds the MWE (if any) at a position in the sequence of words.

l - An array of the words to be searched.
pos - The position in the array of the first word of the MWE.
if 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)
Adds a MWE to the model.

mweWords - The space separated MWE to add to the model.

Copyright © 2003 Jason Baldridge and Gann Bierner. All Rights Reserved.