Menu

Term Operations

David Fisher

Terms are the basic building blocks of Indri queries. Terms come in the form of single term, ordered and unordered phrases, synonyms, among others. In addition, there are a number of options that allow you to specify if a term should appear within a certain field, or if it should be scored within a given context.

Term Operations in the Indri Query Language:

Name Example Behavior
term dog occurrences of dog (Indri will stem and stop)
"term" "dog" occurrences of dog (Indri will not stem or stop)
ordered window #od''n''(blue car) -or- #''n''(blue car) blue ''n'' words or less before car
unordered window #uw''n''(blue car) blue within ''n'' words of car
synonym list #syn(car automobile) occurrences of car or automobile
weighted synonym #wsyn(1.0 car 0.5 automobile) like synonym, but only counts occurrences of automobile as 0.5 of an occurrence
any operator #any:person all occurrences of the person field

Related

Wiki: Home
Wiki: The Indri Query Language

Discussion

  • Aarjavee S. Kamdar

    Hi David,
    How can I use these term operations via the terminal of Ubuntu? What directory I should be in?

    For example, I'm currently in the indri-5.11/ directory.
    What command should I run to get the results for #uw"3"(blue car)?

    Edit:
    I tried running the following command:
    IndriRunQuery -query="#uw3(Leave Petition)" -index=./index_test-3/

    and I get the following output:
    -7.40671 /home/aarjavee/indri/indri-5.11/Task-1/Task_1/Train_docs/case_0_statement.txt 0 1647

    which is not the desired result, as there does exist an exact phrase "Leave Petition" in the file

    Please guide.

    Thanks :)

    Regards,
    Aarjavee.

     

    Last edit: Aarjavee S. Kamdar 2017-09-07
  • David Fisher

    David Fisher - 2017-09-07

    I do not understand your question. If the two words occur within the document within the specified window, how is the result not desired? Please move your question to the appropriate discussion forum (https://sourceforge.net/p/lemur/discussion/). These comments will be deleted from the wiki.

     

Log in to post a comment.

MongoDB Logo MongoDB