public class MWEIndex extends InMemoryMWEIndex
IMWEIndex
that reads an index, possibly with internal comments
prefixed by '//' or ';;', from a URL.lifecycleLock
commentDoubleSemicolon, commentDoubleSlash
Constructor and Description |
---|
MWEIndex(java.io.File file)
Constructs the index from the given source file pointing to a list of
multi-word expressions.
|
MWEIndex(java.lang.Iterable<java.lang.String> origData)
Constructs the index from a String of multi-word expressions.
|
MWEIndex(java.util.Map<IMWEDescID,? extends IRootMWEDesc> rootDescs)
Constructs the index from a map of IMWEDescIDs to IRootMWEDescs.
|
MWEIndex(java.lang.String... rootDescs)
Constructs this index from an array of multi-word expression strings.
|
MWEIndex(java.net.URL url)
Constructs a new MWE index that uses the data from the specified URL to
construct its index.
|
Modifier and Type | Method and Description |
---|---|
protected java.util.Map<IMWEDescID,? extends IRootMWEDesc> |
createData() |
java.net.URL |
getSource()
Returns the URL used by this index.
|
checkOpen, close, createData, createData, createIndex, get, get, getAll, getIndexIterator, getInflectedMWEDesc, getRootIterator, getRootMWEDesc, insert, isComment, isOpen, open
public MWEIndex(java.lang.String... rootDescs)
rootDescs
- the array of multi-word expression strings this index will be
constructed from.public MWEIndex(java.lang.Iterable<java.lang.String> origData)
this_and_that_R
origData
- iterable of multi-word expression definitions. The parts and
part of speech of each multi-word expression should be
separated by underscores and each multi-word expression, if
there is more than one, should be separated by a space
character.public MWEIndex(java.util.Map<IMWEDescID,? extends IRootMWEDesc> rootDescs)
rootDescs
- a map of IMWEDescIDs to IRootMWEDescs. May not be
/null
.public MWEIndex(java.io.File file)
file
- the list of multi-word expressions. May not be
null
.public MWEIndex(java.net.URL url)
url
- the URL at which the index data is foundjava.lang.NullPointerException
- if the specified URL is null
public java.net.URL getSource()
null
, used by this indexprotected java.util.Map<IMWEDescID,? extends IRootMWEDesc> createData() throws java.io.IOException
createData
in class InMemoryMWEIndex
java.io.IOException
Copyright © 2011 Massachusetts Institute of Technology. All Rights Reserved.