Class FirstName

    • Field Detail

      • SEMANTIC_TYPE

        public static final String SEMANTIC_TYPE
        The Semantic type for this Plugin.
        See Also:
        Constant Field Values
    • Constructor Detail

      • FirstName

        public FirstName​(PluginDefinition plugin)
        Construct a First Name plugin based on the Plugin Definition.
        Parameters:
        plugin - The definition of this plugin.
    • Method Detail

      • isValid

        public boolean isValid​(String input,
                               boolean detectMode)
        Description copied from class: LogicalType
        Is the supplied String an instance of this Semantic type?
        Overrides:
        isValid in class PersonName
        Parameters:
        input - String to check (trimmed for Numeric base Types, un-trimmed for String base Type)
        detectMode - If true then we are in the process of detection, otherwise it is a simple validity check.
        Returns:
        true iff the supplied String is an instance of this Semantic type.
      • getConfidence

        public double getConfidence​(long matchCount,
                                    long realSamples,
                                    AnalyzerContext context)
        Description copied from class: LogicalType
        Confidence in the type classification. Typically this will be the number of matches divided by the number of real samples.
        Overrides:
        getConfidence in class LogicalType
        Parameters:
        matchCount - Number of matches (as determined by isValid())
        realSamples - Number of samples observed - does not include either nulls or blanks
        context - Context we are operating under (includes data stream name(s))
        Returns:
        Confidence as a percentage.