public class MatchingAnnotator extends Annotator
| Modifier and Type | Class and Description |
|---|---|
static class |
MatchingAnnotator.MatchingStrategy |
| Modifier and Type | Field and Description |
|---|---|
protected static org.slf4j.Logger |
log |
protected MatchingAnnotator.MatchingStrategy |
matchingStrategy |
protected int |
minimumWordLength |
protected Annotation.Source |
source |
protected net.amygdalum.stringsearchalgorithms.search.chars.StringSearchAlgorithm |
stringSearch |
protected String |
type |
protected Pattern |
uppercaseMatcher |
protected WordHelpers |
wordHelpers |
protected Pattern |
wordLengthMatcher |
components, it, provenance, tagger| Constructor and Description |
|---|
MatchingAnnotator() |
MatchingAnnotator(MatchingAnnotator.MatchingStrategy matchingStrategy) |
MatchingAnnotator(MatchingAnnotator.MatchingStrategy matchLowercase,
Annotation.Source source) |
MatchingAnnotator(MatchingAnnotator.MatchingStrategy matchLowercase,
Annotation.Source source,
String type) |
MatchingAnnotator(MatchingAnnotator.MatchingStrategy matchLowercase,
Annotation.Source source,
String type,
int minWordLength) |
| Modifier and Type | Method and Description |
|---|---|
void |
annotate(Collection<Document> docs) |
void |
annotate(Iterable<Document> docs,
Annotation.Source source)
Annotates a Dataset using the pre-trained list.
|
void |
clearTermsToMatch() |
protected Collection<String> |
convertTerms(Stream<String> terms) |
protected String |
convertToLowercase(String text) |
int |
countTerms() |
void |
deleteTermsToMatch(Collection<String> terms) |
void |
deleteTermsToMatch(Resource path) |
void |
deleteTermsToMatch(Stream<String> terms) |
void |
loadTermsToMatch(Collection<String> terms) |
void |
loadTermsToMatch(Resource path) |
void |
loadTermsToMatch(Stream<String> terms) |
protected String |
removePlurals(String text) |
addComponent, annotate, annotate, annotate, createDataset, createDocument, getComponent, getProvenance, getTagger, isModelAvailable, isModelAvailableInChildren, readModel, trainModel, writeComponents, writeHTML, writeModel, writeModel, writeTestLog, writeTrainLogprotected static final org.slf4j.Logger log
protected int minimumWordLength
protected String type
protected Pattern wordLengthMatcher
protected Pattern uppercaseMatcher
protected net.amygdalum.stringsearchalgorithms.search.chars.StringSearchAlgorithm stringSearch
protected WordHelpers wordHelpers
protected MatchingAnnotator.MatchingStrategy matchingStrategy
protected Annotation.Source source
public MatchingAnnotator()
public MatchingAnnotator(MatchingAnnotator.MatchingStrategy matchingStrategy)
public MatchingAnnotator(MatchingAnnotator.MatchingStrategy matchLowercase, Annotation.Source source)
public MatchingAnnotator(MatchingAnnotator.MatchingStrategy matchLowercase, Annotation.Source source, String type)
public MatchingAnnotator(MatchingAnnotator.MatchingStrategy matchLowercase, Annotation.Source source, String type, int minWordLength)
protected Collection<String> convertTerms(Stream<String> terms)
public void clearTermsToMatch()
public void loadTermsToMatch(Collection<String> terms)
public void loadTermsToMatch(Resource path) throws IOException
IOExceptionpublic void deleteTermsToMatch(Collection<String> terms)
public void deleteTermsToMatch(Resource path) throws IOException
IOExceptionpublic int countTerms()
protected String convertToLowercase(String text)
public void annotate(Collection<Document> docs)
public void annotate(Iterable<Document> docs, Annotation.Source source)
docs - - the Documents to annotatesource - - the type of annotations to create, e.g. SILVERCopyright © 2020. All rights reserved.