Class TokenizerModel

    • Constructor Detail

      • TokenizerModel

        public TokenizerModel​(MaxentModel tokenizerModel,
                              Map<String,​String> manifestInfoEntries,
                              TokenizerFactory tokenizerFactory)
        Initializes the current instance.
        Parameters:
        tokenizerModel - the model
        manifestInfoEntries - the manifest
        tokenizerFactory - the factory
      • TokenizerModel

        public TokenizerModel​(InputStream in)
                       throws IOException
        Initializes the current instance.
        Parameters:
        in - the Input Stream to load the model from
        Throws:
        IOException - if reading from the stream fails in anyway
        InvalidFormatException - if the stream doesn't have the expected format
      • TokenizerModel

        public TokenizerModel​(File modelFile)
                       throws IOException
        Initializes the current instance.
        Parameters:
        modelFile - the file containing the tokenizer model
        Throws:
        IOException - if reading from the stream fails in anyway
      • TokenizerModel

        public TokenizerModel​(URL modelURL)
                       throws IOException
        Initializes the current instance.
        Parameters:
        modelURL - the URL pointing to the tokenizer model
        Throws:
        IOException - if reading from the stream fails in anyway
    • Method Detail

      • getAbbreviations

        public Dictionary getAbbreviations()
      • useAlphaNumericOptimization

        public boolean useAlphaNumericOptimization()