Class DictionaryNameFinder

  • All Implemented Interfaces:
    TokenNameFinder

    public class DictionaryNameFinder
    extends Object
    implements TokenNameFinder
    This is a dictionary based name finder, it scans text for names inside a dictionary.
    • Constructor Detail

      • DictionaryNameFinder

        public DictionaryNameFinder​(Dictionary dictionary,
                                    String type)
        Initialized the current instance with he provided dictionary and a type.
        Parameters:
        dictionary -
        type - the name type used for the produced spans
      • DictionaryNameFinder

        public DictionaryNameFinder​(Dictionary dictionary)
        Initializes the current instance with the provided dictionary.
        Parameters:
        dictionary -
    • Method Detail

      • find

        public Span[] find​(String[] textTokenized)
        Description copied from interface: TokenNameFinder
        Generates name tags for the given sequence, typically a sentence, returning token spans for any identified names.
        Specified by:
        find in interface TokenNameFinder
        Parameters:
        textTokenized - an array of the tokens or words of the sequence, typically a sentence.
        Returns:
        an array of spans for each of the names identified.
      • clearAdaptiveData

        public void clearAdaptiveData()
        Description copied from interface: TokenNameFinder
        Forgets all adaptive data which was collected during previous calls to one of the find methods. This method is typical called at the end of a document.
        Specified by:
        clearAdaptiveData in interface TokenNameFinder