Here is an example of how to run it, in TIKA-1343 programmatically:
https://issues.apache.org/jira/browse/TIKA-1343 this patch: https://reviews.apache.org/r/22761/ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Chris Mattmann, Ph.D. Chief Architect Instrument Software and Science Data Systems Section (398) NASA Jet Propulsion Laboratory Pasadena, CA 91109 USA Office: 168-519, Mailstop: 168-527 Email: chris.a.mattm...@nasa.gov WWW: http://sunset.usc.edu/~mattmann/ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Director, Information Retrieval and Data Science Group (IRDS) Adjunct Associate Professor, Computer Science Department University of Southern California, Los Angeles, CA 90089 USA WWW: http://irds.usc.edu/ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ On 4/12/16, 8:33 AM, "Tommaso Teofili" <tommaso.teof...@gmail.com> wrote: >thanks Matt for the reply. > >What I could come up so far is the following: >String configFile = "/path/to/config"; >JoshuaConfiguration joshuaConfiguration = new JoshuaConfiguration(); > >joshuaConfiguration.readConfigFile(configFile); >Decoder decoder = new Decoder(joshuaConfiguration, configFile); >ByteArrayOutputStream os = new ByteArrayOutputStream(); >decoder.decodeAll(new TranslationRequestStream(new BufferedReader(new >StringReader(textToTranslate)), joshuaConfiguration), os); >os.flush(); >byte[] bytes = os.toByteArray(); >String translationOutput = IOUtils.toString(bytes, >Charset.defaultCharset().name()); > > >I think it'd be good if we could support such a usage, I'll keep >experimenting. > >Regards, >Tommaso > > > >Il giorno mar 12 apr 2016 alle ore 17:09 Matt Post <p...@cs.jhu.edu> ha >scritto: > >> Hi Tommaso, >> >> There isn't really, unfortunately. I have never used Joshua as a library; >> it would be nice if the Amazon folks (who I infer have done so, from a >> comment on their last commit) would contribute a doc on this front. >> >> What is the preferred avenue for developer documentation? Javadocs, or >> something else? >> >> matt >> >> >> > On Apr 12, 2016, at 6:09 AM, Tommaso Teofili <tommaso.teof...@gmail.com> >> wrote: >> > >> > Hi all, >> > >> > I am going through the code (so I'll probably figure it out at some >> point), >> > however I wonder if there's a quick guide on how to start using Joshua >> > programmatically as I am start having a look at how it could be >> integrated >> > into other projects. >> > >> > Regards, >> > Tommaso >> >>