• Type: New Feature New Feature
    • Status: Open
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: 0.7
    • Fix Version/s: None
    • Component/s: languageidentifier
    • Labels:


      Some languages have variants, and there are ISO codes to identify both the variants as well as a code to identify the macro-language. There should be a way to tell whether the identified language is part of a "macro language" and to return the macro language. This is because different applications require different codes. E.g. for search it makes sense to tag the document with both the unique code and the macro code.

      Norwegian: no
      Norwegian bokmål: nb
      Norwegian nynorsk: nn

      The getLanguage() call should continue to return the most correct and specific ISO code (according to which language profile matched).

      In addition, it should be possible to get the macro language.

      Proposed implementation:
      Add some new methods:

      public boolean hasMacroLanguage() // true | false
      public String getMacroLanguage() // In case of "nn" or "nb", result would be "no"

      The definition of macro languages can be added in the property file introduced in TIKA-490.

        Issue Links


          Jan Høydahl created issue -
          Ken Krugler made changes -
          Field Original Value New Value
          Assignee Ken Krugler [ kkrugler ]
          Ken Krugler made changes -
          Priority Major [ 3 ] Minor [ 4 ]
          Ken Krugler made changes -
          Link This issue relates to TIKA-1723 [ TIKA-1723 ]


            • Assignee:
              Ken Krugler
              Jan Høydahl
            • Votes:
              0 Vote for this issue
              0 Start watching this issue


              • Created: