[
https://issues.apache.org/jira/browse/TIKA-490?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Jan Høydahl updated TIKA-490:
-----------------------------
Attachment: TIKA-490.janhoy.082310.patch
Yepp, I saw that.
This patch removes the try's from test.
I also removed the call to initProfiles() from constructor, as we now call it
statically, and we no longer throw IOException in constructor, so we don't need
it there for that purpose.
I also took the freedom of adding a simple getter
public double getDistance()
I know that it is not directly related to this issue, so feel free to discard
it and I will create a new ticket fir it.
But given its low risk and high gain... at least until TIKA-369 is implemented.
it would let the consumer decide what is certain enough for his use case. by
e.g. computing normalized distance based on text length.
An alternative is to mark it as deprecated and semi-internal, as the numerical
value will probably change with TIKA-369.
> Support for adding language profiles dynamically
> ------------------------------------------------
>
> Key: TIKA-490
> URL: https://issues.apache.org/jira/browse/TIKA-490
> Project: Tika
> Issue Type: Improvement
> Components: languageidentifier
> Affects Versions: 0.7
> Reporter: Jan Høydahl
> Assignee: Chris A. Mattmann
> Fix For: 0.8
>
> Attachments: TIKA-490.janhoy.082310.patch,
> TIKA-490.janhoy.082310.patch, TIKA-490.Mattmann.082210.2.patch.txt,
> TIKA-490.Mattmann.082210.patch.txt, TIKA-490.patch, TIKA-490.patch
>
> Original Estimate: 24h
> Remaining Estimate: 24h
>
> Currently the Tika LanguageIdentifier loads language profiles thorugh a
> hardcoded static block in the java code.
> It would be better to make this configurable, so you could add your own
> languages without recompiling.
> Suggested approach:
> Remove the static code block loading all languages. Instead look for a
> tika.languageidentification.properties file on classpath.
> Now the user can simply make his/her own (additional) language profile files,
> put them on the classpath together with a properties file and off you go!
> Also, once you make it configurable, there might be an issue of having the
> profiles as static members, as you will force the same behaviour for the
> whole VM. A static Map of Maps could solve this.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.