Target Type Identification

The command-line application for target type identification.


python -m <config_file> -q <query>

If -q <query> is passed, it returns the results for the specified query and prints them in terminal.

Config parameters

  • method: name of TTI method; accepted values: [“tc”, “ec”, “ltr”]
  • num_docs: number of documents to return
  • start: starting offset for ranked documents
  • model: retrieval model, if method is “tc” or “ec”; accepted values: [“lm”, “bm25”]
  • ec_cutoff: if method is “ec”, rank cut-off of top-K entities for EC TTI
  • field: field name, if method is “tc” or “ec”
  • smoothing_method: accepted values: [“jm”, “dirichlet”]
  • smoothing_param: value of lambda or mu; accepted values: [float or “avg_len”]
  • query_file: path to query file (JSON)
  • output_file: path to output file (JSON)
  • trec_output_file: path to output file (trec_eval-formatted)

Example config

{ "method": "ec",
  "num_docs": 10,
  "model": "lm",
  "first_pass": {
      "num_docs": 50
  "smoothing_method": "dirichlet",
  "smoothing_param": 2000,
  "ec_cutoff": 20,
      "query_file": "path/to/queries.json",
      "output_file": "path/to/output.txt",

Author:Dario Garigliotti

Bases: object


Annotates, in a batch, queries with identified target types, and outputs results.


Performs target type identification for the query.

Parameters:query (str) – query string
Returns:annotated query[source][source]