Uploaded image for project: 'Stanbol (Retired)'
  1. Stanbol (Retired)
  2. STANBOL-881

(Re)add the String only Constructor to the PosTag class

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • enhancer-0.10.0
    • Enhancer
    • None

    Description

      This was removed because the "PosTag(String tag, LexicalCategory...lc)" also allowd to create unmapped (tag only) instances.

      However this is only true for java source code. When using the reflection API it is not possible to obtain an string only constructor. because of that the call to

      PosTag.class.getConstructor(String.class)

      results in a "NoSuchMethodException: org.apache.stanbol.enhancer.nlp.pos.PosTag.<init>(java.lang.String)".

      An example of an component that tires to obtain the string only constructor of PosTag is the "CeliTagSetRegistry". Because of that it encounters a

      Caused by: java.lang.NoSuchMethodException: org.apache.stanbol.enhancer.nlp.pos.PosTag.<init>(java.lang.String)
      at java.lang.Class.getConstructor0(Class.java:2706)
      at java.lang.Class.getConstructor(Class.java:1657)
      at org.apache.stanbol.enhancer.engines.celi.CeliTagSetRegistry.getTag(CeliTagSetRegistry.java:354)

      This was not discovered until Jenkins build #1208 because all POS tags used by CELI where actually predefined in the mappings defined by the registry. However (most likely) due to an server side change of the CELI server this is no longer the case - causing the registry to create an ad-hoc PosTag for the unknown mapping and therefore throwing this exception

      Attachments

        Activity

          People

            rwesten Rupert Westenthaler
            rwesten Rupert Westenthaler
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: