Uploaded image for project: 'UIMA'
  1. UIMA
  2. UIMA-5730

Using parameters of PearSpecifier for configuring wrapped analysis engine description

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.10.2SDK, 3.0.0SDK
    • 3.0.1SDK, 2.10.3SDK
    • Core Java Framework
    • None

    Description

      The PearSpecifier provides functionality for setting parameters, which could be used for configuring the wrapped analysis engine description.

       

      Matthias Koch wrote: 

       

      I want to configure a PEAR dynamically. (I install the pear and want to produce the analysis engine with different parameters than in the xml).
      Is this possible? Can I use the additionalParameters? I have seen that the PearSpecifier has an instance variable for parameters, but no one is using (calling) it.

      I want to produce the analysisEngine with: UIMAFramework.produceAnalysisEngine(resourceSpecifer, resourceManager, params);

      In this specifier there should be one or more pearSpecifiers that should be configured.

      I have overridden the PearAnalysisEngineWrapper and built a loop that configures the following specifier over the configurationParameterSettings. It takes the parameters from the pear specifiers.

      line 257-258
      // Parse the resource specifier
      ResourceSpecifier specifier = UIMAFramework.getXMLParser().parseResourceSpecifier(in);

      ==> added code
      AnalysisEngineDescription analysisEngineDescription = (AnalysisEngineDescription) specifier;
      AnalysisEngineMetaData analysisEngineMetaData = analysisEngineDescription.getAnalysisEngineMetaData();
      ConfigurationParameterSettings configurationParameterSettings = analysisEngineMetaData.getConfigurationParameterSettings();
      for (Parameter parameter : Arrays.asList(pearSpec.getParameters()))

      Unknown macro: { configurationParameterSettings.setParameterValue(parameter.getName(), parameter.getValue()); }

      Attachments

        1. UIMA-5730.diff
          37 kB
          Matthias Koch
        2. UIMA-5730.diff
          8 kB
          Matthias Koch
        3. analysisEngineWithParameters.pear
          19 kB
          Matthias Koch

        Activity

          People

            schor Marshall Schor
            pkluegl Peter Klügl
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: