Class Index
- Namespace
- NOpenNLP.Tools.Dictionary
- Assembly
- NOpenNLP.Tools.dll
This classes indexes StringLists. This makes it possible to check if a certain token is contained in at least one of the StringLists.
public class Index
- Inheritance
-
Index
- Inherited Members
Constructors
Index(IEnumerable<StringList>)
Initializes the current instance with the given StringList IEnumerable<T>.
public Index(IEnumerable<StringList> tokenLists)
Parameters
tokenListsIEnumerable<StringList>The token lists to index.
Remarks
NOpenNLP: this parameter was changed from Iterator>StringList< in Java.
While IEnumerator<T> would be the closer match, IEnumerable<T>
is more idiomatic C#/.NET to accept as a parameter.
Methods
Contains(string)
Checks if at least one StringList contains the given token.
public virtual bool Contains(string token)
Parameters
tokenstringThe token to look for.
Returns
- bool
trueif the token is contained, otherwisefalse.