[
https://issues.apache.org/jira/browse/JOSHUA-274?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15313467#comment-15313467
]
Matt Post commented on JOSHUA-274:
----------------------------------
Now that Decoder.decodeAll() returns an iterable Translations object, this is
possible. One item I'd like feedback on, though, is passing metadata to the
decoder. There are situations where I'd like to be able to do things like
change decoder weights, add rules to a private rule table, change the pop
limit, etc. Currently, I do this through a JSON object with a metadata field in
HTTP server mode. If we lost that, do you have another idea for how to pass
such information to the decoder?
Some ideas:
- Input lines starting with '|' will be parsed as metadata. This is nice
because | is already a meta-character that gets subbed out in preprocessing
anyway, so we can be sure that a literal '|' means something special (it's also
used in forced decoding)
- Use an SGML or other format, e.g., <meta>...</meta>
I am thinking of just implementing the first solution. If you want to pass
metadata, it's on a line by itself. Sentence will notice what it is, process
it, and then return a Translation object that has a metadata field, that the
caller can then evaluate (perhaps there will be some return data).
Thoughts?
> Use another HTTPServer other than Suns
> --------------------------------------
>
> Key: JOSHUA-274
> URL: https://issues.apache.org/jira/browse/JOSHUA-274
> Project: Joshua
> Issue Type: Improvement
> Components: decoders
> Affects Versions: 6.0.5
> Reporter: Lewis John McGibbney
> Priority: Critical
> Fix For: 6.1
>
>
> This issue concerns the use of the
> [HttpServer|https://github.com/apache/incubator-joshua/blob/master/src/joshua/decoder/JoshuaDecoder.java#L31]
> within JoshuaDecoder.java.
> We should replace the com.sun.net.httpserver.HttpServer implementation and
> other Sun classes with ones from the Java API.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)