Class OpenNLPTokenizer
Run OpenNLP SentenceDetector and Tokenizer. The last token in each sentence is marked by setting the EOS_FLAG_BIT in the IFlagsAttribute; following filters can use this information to apply operations to tokens one sentence at a time.
Inheritance
System.Object
OpenNLPTokenizer
Implements
System.IDisposable
Inherited Members
Namespace: Lucene.Net.Analysis.OpenNlp
Assembly: Lucene.Net.Analysis.OpenNLP.dll
Syntax
public sealed class OpenNLPTokenizer : SegmentingTokenizerBase, IDisposable
Constructors
| Improve this Doc View SourceOpenNLPTokenizer(AttributeSource.AttributeFactory, TextReader, NLPSentenceDetectorOp, NLPTokenizerOp)
Declaration
public OpenNLPTokenizer(AttributeSource.AttributeFactory factory, TextReader reader, NLPSentenceDetectorOp sentenceOp, NLPTokenizerOp tokenizerOp)
Parameters
Type | Name | Description |
---|---|---|
AttributeSource.AttributeFactory | factory | |
TextReader | reader | |
NLPSentenceDetectorOp | sentenceOp | |
NLPTokenizerOp | tokenizerOp |
OpenNLPTokenizer(TextReader, NLPSentenceDetectorOp, NLPTokenizerOp)
Creates a new OpenNLPTokenizer
Declaration
public OpenNLPTokenizer(TextReader reader, NLPSentenceDetectorOp sentenceOp, NLPTokenizerOp tokenizerOp)
Parameters
Type | Name | Description |
---|---|---|
TextReader | reader | |
NLPSentenceDetectorOp | sentenceOp | |
NLPTokenizerOp | tokenizerOp |
Fields
| Improve this Doc View SourceEOS_FLAG_BIT
Declaration
public static int EOS_FLAG_BIT
Field Value
Type | Description |
---|---|
System.Int32 |
Methods
| Improve this Doc View SourceDispose(Boolean)
Declaration
protected override void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | disposing |
Overrides
| Improve this Doc View SourceIncrementWord()
Declaration
protected override bool IncrementWord()
Returns
Type | Description |
---|---|
System.Boolean |
Overrides
| Improve this Doc View SourceReset()
Declaration
public override void Reset()
Overrides
| Improve this Doc View SourceSetNextSentence(Int32, Int32)
Declaration
protected override void SetNextSentence(int sentenceStart, int sentenceEnd)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | sentenceStart | |
System.Int32 | sentenceEnd |
Overrides
Implements
System.IDisposable