[ 
https://issues.apache.org/jira/browse/OPENNLP-241?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13073043#comment-13073043
 ] 

Jörn Kottmann commented on OPENNLP-241:
---------------------------------------

The Base Model defines the validateArtifactMap method which is responsible to 
validate the model resource map.

I suggest that the model always calls this method to validate itself. This 
needs to be called in two code paths, when the model is loaded from an 
InputStream and when the model is instantiated with various parameters and 
artifacts, as usually done to create it in the first place.

In the later case a different or no validation is performed, that should be 
moved into the validateArtifactMap, and then used in all cases where the model 
is created to validate it.

> Model validations is only performed if instatiated from  Input Stream.
> ----------------------------------------------------------------------
>
>                 Key: OPENNLP-241
>                 URL: https://issues.apache.org/jira/browse/OPENNLP-241
>             Project: OpenNLP
>          Issue Type: Bug
>          Components: Chunker, Coref, Doccat, Name Finder, Parser, POS Tagger, 
> Sentence Detector, Tokenizer
>    Affects Versions: tools-1.5.2-incubating
>            Reporter: William Colen
>            Priority: Minor
>
> Models are not validated if instantiated with the constructor the cross 
> validator, or training code uses.
> The validation is only performed when it is loaded from an Input Stream.
> For example the POS Model does not validate the dictionary tagset while 
> training or executing cross validation, only during execution tool or 
> evaluation.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira


Reply via email to