Class POSModel

    • Constructor Detail

      • POSModel

        public POSModel​(java.lang.String languageCode,
                        SequenceClassificationModel<java.lang.String> posModel,
                        java.util.Map<java.lang.String,​java.lang.String> manifestInfoEntries,
                        POSTaggerFactory posFactory)
      • POSModel

        public POSModel​(java.lang.String languageCode,
                        MaxentModel posModel,
                        java.util.Map<java.lang.String,​java.lang.String> manifestInfoEntries,
                        POSTaggerFactory posFactory)
      • POSModel

        public POSModel​(java.lang.String languageCode,
                        MaxentModel posModel,
                        int beamSize,
                        java.util.Map<java.lang.String,​java.lang.String> manifestInfoEntries,
                        POSTaggerFactory posFactory)
      • POSModel

        public POSModel​(java.io.InputStream in)
                 throws java.io.IOException
        Throws:
        java.io.IOException
      • POSModel

        public POSModel​(java.io.File modelFile)
                 throws java.io.IOException
        Throws:
        java.io.IOException
      • POSModel

        public POSModel​(java.nio.file.Path modelPath)
                 throws java.io.IOException
        Throws:
        java.io.IOException
      • POSModel

        public POSModel​(java.net.URL modelURL)
                 throws java.io.IOException
        Throws:
        java.io.IOException
    • Method Detail

      • getPosModel

        @Deprecated
        public MaxentModel getPosModel()
        Deprecated.
        use getPosSequenceModel instead. This method will be removed soon. Only required for Parser 1.5.x backward compatibility. Newer models don't need this anymore.
      • getNgramDictionary

        public Dictionary getNgramDictionary()
        Retrieves the ngram dictionary.
        Returns:
        ngram dictionary or null if not used
      • getArtifactSerializerClass

        public java.lang.Class<POSModelSerializer> getArtifactSerializerClass()
        Description copied from interface: SerializableArtifact
        Retrieves the class which can serialize and recreate this artifact.
        Note: The serializer class must have a public zero argument constructor or an exception is thrown during model serialization/loading.
        Specified by:
        getArtifactSerializerClass in interface SerializableArtifact
        Returns:
        the corresponding ArtifactSerializer class.