GrammarScope  4.0.0
Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
grammarscope.server.parser.Segmenter Class Reference
Inheritance diagram for grammarscope.server.parser.Segmenter:
Inheritance graph
[legend]
Collaboration diagram for grammarscope.server.parser.Segmenter:
Collaboration graph
[legend]

Public Member Functions

 Segmenter (final Language language)
 
List< List< CoreLabel > > getSentenceWords (final String text)
 
List< List< CoreLabel > > getSentenceWords (final URL url) throws IOException
 
String getTokenizeModel ()
 

Private Member Functions

List< CoreLabel > getTokens (final String text)
 
List< CoreLabel > getTokens (final URL url) throws IOException
 

Static Private Member Functions

static List< List< CoreLabel > > getSentences (final List< CoreLabel > words)
 

Private Attributes

final TokenizerFactory< CoreLabel > tokenizerFactory
 

Detailed Description

Segmenter

Author
Bernard Bou

Constructor & Destructor Documentation

◆ Segmenter()

grammarscope.server.parser.Segmenter.Segmenter ( final Language  language)

Constructor

Parameters
languagelanguage

Member Function Documentation

◆ getSentences()

static List<List<CoreLabel> > grammarscope.server.parser.Segmenter.getSentences ( final List< CoreLabel >  words)
staticprivate

Segment words into sentences

Parameters
wordswords
Returns
sentence-indexed words

◆ getSentenceWords() [1/2]

List<List<CoreLabel> > grammarscope.server.parser.Segmenter.getSentenceWords ( final String  text)

Get sentences from text

Parameters
texttext to segment
Returns
list of sentences

Implements grammarscope.server.parser.iface.ISegmenter.

◆ getSentenceWords() [2/2]

List<List<CoreLabel> > grammarscope.server.parser.Segmenter.getSentenceWords ( final URL  url) throws IOException

Get document from URL

Parameters
urlURL
Returns
list of sentences
Exceptions
IOExceptionexception

Implements grammarscope.server.parser.iface.ISegmenter.

◆ getTokenizeModel()

String grammarscope.server.parser.Segmenter.getTokenizeModel ( )

Get tokenize model

Returns
model

Implements grammarscope.server.parser.iface.ISegmenter.

◆ getTokens() [1/2]

List<CoreLabel> grammarscope.server.parser.Segmenter.getTokens ( final String  text)
private

Get list of tokens from text

Parameters
texttext
Returns
list of tokens

◆ getTokens() [2/2]

List<CoreLabel> grammarscope.server.parser.Segmenter.getTokens ( final URL  url) throws IOException
private

Get list of tokens from URL

Parameters
urldocument URL
Returns
list of tokens
Exceptions
IOExceptionexception

Member Data Documentation

◆ tokenizerFactory

final TokenizerFactory<CoreLabel> grammarscope.server.parser.Segmenter.tokenizerFactory
private

The documentation for this class was generated from the following file: