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

Aliaksandr Autayeu commented on OPENNLP-402:
--------------------------------------------

===
I don't get your point here. Why do we need to rename the files? I just need to 
provide a path to a file (or a directory).
===
I thought the format was to be specified as file extension. Overlooked that it 
pertains to the tool name.

... format is added to the tool name?
These are good reasons. Thank you for advice. Done.

- Remove author tags, code is owned by the community and not individuals, we 
list contributors and committers on the team page. 
Done.

- Don't rename classes which are part of our public API, breaks backward 
compatibility (NameSampleDataStream, WordTagSampleStream) 
Done. They did not follow the pattern, that's why I did that. Having class 
names follow the pattern might be worth breaking the compatibility.

- Should AbstractCLITool.getHelp return this: "Usage: " + CLI.CMD + " " + 
getName() ? 
Done with basicHelp

- Why was InvalidFormatException removed from some ModelLoader sub-classes? 
IOException is a more general one, already in throws: public class 
InvalidFormatException extends IOException {

- Documentation should be updated as well 
Done + JIRAs 215 and 218.

Some extra notes:

I have updated documentation a bit to resolve JIRAs 215 and 218 and have 
updated examples which used deprecated methods to use new ones. I probably 
should have done this in separate patches, but I've got carried away. Some 
parameters descriptions have been updated to make the help uniform and 
coherent. Some inappropriately used <programlisting> have been changed to 
<screen>.

In some places tool return codes have been updated to return 0 (no mistakes, 
OK) when help is printed, and -1 on mistakes (parameters or else)

In some places I have removed Javadocs where they duplicated those already 
written on interfaces.

To a TerminateToolException was added a convention on error codes and an 
attempt was made to convert some direct print() calls to centralize error 
processing.
                
> CLI tools and formats refactored
> --------------------------------
>
>                 Key: OPENNLP-402
>                 URL: https://issues.apache.org/jira/browse/OPENNLP-402
>             Project: OpenNLP
>          Issue Type: Improvement
>          Components: Command Line Interface, Formats
>    Affects Versions: tools-1.5.3-incubating
>            Reporter: Aliaksandr Autayeu
>              Labels: patch
>         Attachments: 0016-CLI-tools-and-formats-refactored.patch, 
> 0017-added-direct-format-support-to-CLI-tools-and-formats.patch
>
>
> Proposed patch refactors CLI tools and simplifies the code by introducing 
> hierarchy and removing a lot of code duplication. It also introduces better 
> error and help messages, including help for formats and listing available 
> formats in various tools, which are now able to work with formats directly. 
> This, in turn, eliminates the need to keep converted files on disk.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to