Configure the Passage Extractor System

The Answer Server configuration file contains information about the subcomponents in your Passage Extractor systems.

For any Passage Extractor system, you must configure the host and port details of your data store, which is an IDOL Content component that contains the documents that Answer Server uses to find answers. For entity extraction, you must also configure the details for your Eduction grammars, and the Passage Extractor Agentstore component.

Passage extractor also uses question classifiers, to determine the type of a question, and therefore what entities to extract from candidate answers. The classifier is required. The Answer Server installation includes classifiers for some languages, but for others you must train a classifier yourself.

The following procedure describes how to configure the Passage Extractor system in Answer Server.

For more details about the configuration parameters for the Passage Extractor system, refer to the Answer Server Reference.

To configure the Passage Extractor System

  1. Open the Answer Server configuration file in a text editor.

  2. Find the [Systems] section, or create one if it does not exist. This section contains a list of systems, which refer to the associated configuration sections for each system.

  3. After any existing systems, add an entry for your new Passage Extractor system. For example:

    [Systems]
    0=MyAnswerBank
    1=MyFactBank
    2=MyPassageExtractor
  4. Create a configuration section for your Passage Extractor system, with the name that you specified. For example, [MyPassageExtractor].

  5. Set Type to PassageExtractor.

  6. Set IDOLHost and IDOLACIPort to the host name and ACI Port of the IDOL Content component that contains the documents that you want to use to find answers.

    NOTE: If you want to use synonyms to expand queries, set these parameters to the host and port of the Query Manipulation Server (QMS) that provides access to your synonyms. Set the host and port of the Content component in the QMS configuration file instead. For more information about how to enable synonyms, see Use Synonyms to Expand Queries.

  7. Set AgentstoreHost and AgentstoreACIPort to the host name and ACI Port of the IDOL Content component that contains entity agents.

  8. Set EductionGrammars to a comma-separated list of the Eduction grammars to use for entity extraction.

  9. Set the ClassifierFile parameter to the path of the question classifier file, and set LabelFile to the path of the label file.

    TIP: The Answer Server installation includes classifier and labels files for English and German. For example, to use the default files for the English language, set ClassifierFile to the location of the svm_en.dat file, and set LabelFile to the location of the labels_en.dat file.

    If you want to train your own classifier or are configuring a Passage Extractor system for use with another language, set the ClassifierFile and LabelFile parameters to the locations where you want Answer Server to save the question classifier and label files, when you perform training. For information about how to train classifiers, see Train Passage Extractor Classifiers.

  10. Save and close the configuration file.

  11. Restart Answer Server for your changes to take effect.

For example:

[MyPassageExtractor]
Type=PassageExtractor
// Data store IDOL
IdolHost=localhost
IdolAciport=6002
// Entity Agentstore
AgentStoreHost=localhost
AgentStoreAciport=5002
// Eduction
EductionGrammars=./resources/grammars/question_grammar_en.ecr,./passageextractor/eduction/number_en.ecr,./passageextractor/eduction/person_en.ecr,./passageextractor/eduction/date_en.ecr,./passageextractor/eduction/money_en.ecr
// Classifier Files
ClassifierFile=./passageextractor/classifiertraining/svm_en.dat
LabelFile=./passageextractor/classifiertraining/labels_en.dat
EntityExtractionFile=./passageextractor/configuration/entity_extraction_en.json
SurfacePatternsFile=./passageextractor/configuration/surface_patterns_en.json
ClassifierBehaviorFile=./passageextractor/configuration/classifier_behavior.json

Change the Passage Extractor Language

The default installation of passage extractor includes the question_grammar_en.ecr, and example question classifier training files for English. To use passage extractor in another language, you must:

  • create a new question classifier in the new language. See Train Passage Extractor Classifiers.
  • set the Language configuration parameter to the appropriate language, either in the [Server] section (to set the language for all of Answer Server), or in the passage extractor system configuration section (to set the language for just passage extractor). You might also want to set the StopList parameter. See Language Configuration.
  • set the EductionGrammars parameter to use the grammar file for the appropriate language. Passage extractor uses the same grammar files as fact bank. The Answer Server installation includes appropriate grammars for English, French, German, Italian, Portuguese, and Spanish. If you are interested in using passage extractor in other languages, contact your Micro Focus account manager.