Package com.cobber.fta.plugins
Class CountryEN
- Object
-
- LogicalType
-
- LogicalTypeCode
-
- LogicalTypeFinite
-
- LogicalTypeFiniteSimple
-
- LogicalTypeFiniteSimpleExternal
-
- com.cobber.fta.plugins.CountryEN
-
- All Implemented Interfaces:
LTRandom
,Comparable<LogicalType>
public class CountryEN extends LogicalTypeFiniteSimpleExternal
Plugin to detect Country names. (English-language only).
-
-
Field Summary
-
Fields inherited from class com.cobber.fta.LogicalTypeFiniteSimple
backout, memberSet, reader, regExp, semanticType
-
Fields inherited from class com.cobber.fta.LogicalTypeFinite
maxLength, minLength
-
Fields inherited from class com.cobber.fta.LogicalType
analysisConfig, defn, locale, localeInfo, pluginLocaleEntry, priority, threshold
-
-
Constructor Summary
Constructors Constructor Description CountryEN(PluginDefinition plugin)
Construct a plugin to detect Country names based on the Plugin Definition.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PluginAnalysis
analyzeSet(AnalyzerContext context, long matchCount, long realSamples, String currentRegExp, Facts facts, FiniteMap cardinality, FiniteMap outliers, TokenStreams tokenStreams, AnalysisConfig analysisConfig)
Given the data to date as embodied by the arguments return an analysis.-
Methods inherited from class com.cobber.fta.LogicalTypeFiniteSimple
getMembers, getRegExp, getSemanticType, initialize, isMember, nextRandom, setContent
-
Methods inherited from class com.cobber.fta.LogicalTypeFinite
getIgnorable, getMaxLength, getMinLength, getSize, isClosed, isRegExpComplete, isValid
-
Methods inherited from class com.cobber.fta.LogicalTypeCode
getRandom, seed
-
Methods inherited from class com.cobber.fta.LogicalType
acceptsBaseType, compareTo, getBaseType, getConfidence, getDescription, getHeaderConfidence, getPluginDefinition, getPriority, getSignature, getThreshold, isLocaleSensitive, isValid, setThreshold
-
-
-
-
Constructor Detail
-
CountryEN
public CountryEN(PluginDefinition plugin)
Construct a plugin to detect Country names based on the Plugin Definition.- Parameters:
plugin
- The definition of this plugin.
-
-
Method Detail
-
analyzeSet
public PluginAnalysis analyzeSet(AnalyzerContext context, long matchCount, long realSamples, String currentRegExp, Facts facts, FiniteMap cardinality, FiniteMap outliers, TokenStreams tokenStreams, AnalysisConfig analysisConfig)
Description copied from class:LogicalType
Given the data to date as embodied by the arguments return an analysis. If we think this is an instance of this Semantic type then valid will be true , if invalid then valid will be false and a new Pattern will be returned.- Overrides:
analyzeSet
in classLogicalTypeFiniteSimple
- Parameters:
context
- The context used to interpret the Data Stream (for example, stream name, date resolution mode, etc)matchCount
- Number of samples that match so far (as determined by isValid()realSamples
- Number of real (i.e. non-blank and non-null) samples that we have processed so far.currentRegExp
- The current Regular Expression that we matched againstfacts
- Facts (min, max, sum) for the analysis to date (optional - i.e. maybe null)cardinality
- Cardinality set, up to the maximum maintainedoutliers
- Outlier set, up to the maximum maintainedtokenStreams
- Shapes observedanalysisConfig
- The Configuration of the current analysis- Returns:
- Null if we think this is an instance of this Semantic type (backout pattern otherwise)
-
-