Uploaded image for project: 'Terrier Core'
  1. Terrier Core
  2. TR-343

java.lang.NumberFormatException: For input string: "" while evaluating a result file

    Details

    • Type: Task
    • Status: Resolved
    • Priority: Major
    • Resolution: Invalid
    • Affects Version/s: 3.6
    • Fix Version/s: 4.1
    • Component/s: .evaluation
    • Labels:
      None

      Description

      I am doing experimentation with terrier 3.6 for my research purpose.
      i was not netting any errors till retrieval, but at the time of evaluation, i used the following command and get the following errors

      D:\Programming\terrier-3.6>.\bin\trec_terrier.bat -e -Dtrec.qrels=D:\Programming\Fire_2010_dataset\en.qrels.76-125.2010.txt
      Set TERRIER_HOME to be D:\Programming\terrier-3.6
      INFO - Evaluating result file: D:\Programming\terrier-3.6\var\results/TF_IDF_1.r
      es
      A problem occurred: java.lang.NumberFormatException: For input string: ""
      java.lang.NumberFormatException: For input string: ""
              at java.lang.NumberFormatException.forInputString(Unknown Source)
              at java.lang.Integer.parseInt(Unknown Source)
              at java.lang.Integer.parseInt(Unknown Source)
              at org.terrier.evaluation.AdhocEvaluation.evaluate(AdhocEvaluation.java:168)
              at org.terrier.applications.TrecTerrier.run(TrecTerrier.java:526)
              at org.terrier.applications.TrecTerrier.applyOptions(TrecTerrier.java:589)
              at org.terrier.applications.TrecTerrier.main(TrecTerrier.java:246)

      i upload the necessary result file .res, result setting file, terrier.property file and the terrier.qrels file in a zipped folder, please suggest me the required solution to remove this issue.

        Attachments

          Activity

          Hide
          craigm Craig Macdonald added a comment -

          Tagging for 4.1

          Show
          craigm Craig Macdonald added a comment - Tagging for 4.1
          Hide
          richardm Richard McCreadie added a comment -

          The query identifiers (e.g. '79') are missing from the result files and instead are replaced with snippets of the input query such as "<title>Clashes" or "Reasons".

          This has happened because the query file was formatted in a classical TREC style, e.g.

          <TOP>
          <NUM>79</NUM>
          <TITLE>MY QUERY</TITLE>
          </TOP>

          but 'trec.topics.parser=SingleLineTRECQuery' was set that expected input like:

          79 MY QUERY

          This caused the queries to be incorrectly interpreted. The issue could be fixed by removing 'trec.topics.parser=SingleLineTRECQuery' from the properties file.

          Show
          richardm Richard McCreadie added a comment - The query identifiers (e.g. '79') are missing from the result files and instead are replaced with snippets of the input query such as "<title>Clashes" or "Reasons". This has happened because the query file was formatted in a classical TREC style, e.g. <TOP> <NUM>79</NUM> <TITLE>MY QUERY</TITLE> </TOP> but 'trec.topics.parser=SingleLineTRECQuery' was set that expected input like: 79 MY QUERY This caused the queries to be incorrectly interpreted. The issue could be fixed by removing 'trec.topics.parser=SingleLineTRECQuery' from the properties file.
          Hide
          richardm Richard McCreadie added a comment -

          This is a configuration issue not a software bug.

          Show
          richardm Richard McCreadie added a comment - This is a configuration issue not a software bug.

            People

            • Assignee:
              richardm Richard McCreadie
              Reporter:
              vijaymnit Vijay Kumar Sharma
            • Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: