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

Use stopword list as a resource (including resource file system)

    Details

    • Type: Task
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.2
    • Component/s: None
    • Labels:
      None

      Description

      This is now in 4.2. Richard to verify.

        Attachments

          Activity

          craigm Craig Macdonald created issue -
          craigm Craig Macdonald made changes -
          Field Original Value New Value
          Description This is now in 4.2. Richard to verify.
          Fix Version/s 4.2 [ 10080 ]
          Assignee Craig Macdonald [ craigm ] Richard McCreadie [ richardm ]
          Hide
          richardm Richard McCreadie added a comment -

          Stopword list is not found when importing Terrier using maven.

          WARNING: The file terrier.properties was not found at location /etc/terrier.properties
          Assuming the value of terrier.home from the corresponding system property.
          Please ensure that the property terrier.home
          is specified in the file terrier.properties,
          or as a system property in the command line.
          13:21:25 DEBUG [main] - [FixedSizeTextFactory]- FixedSizeTextFactory: maxKeyWrittenSize=61 for term of size 20
          13:21:25 ERROR [main] - [Stopwords]- Errror: Input/Output Exception while reading stopword list (resource:/stopword-list.txt) : Stack trace follows.
          java.io.FileNotFoundException: No file system for resource:/stopword-list.txt
          at org.terrier.utility.Files.openFile(Files.java:304) ~[TerrierTest-0.0.1-SNAPSHOT.jar:na]
          at org.terrier.utility.Files.openFileReader(Files.java:621) ~[TerrierTest-0.0.1-SNAPSHOT.jar:na]
          at org.terrier.utility.Files.openFileReader(Files.java:607) ~[TerrierTest-0.0.1-SNAPSHOT.jar:na]
          at org.terrier.terms.Stopwords.loadStopwordsList(Stopwords.java:131) [TerrierTest-0.0.1-SNAPSHOT.jar:na]
          at org.terrier.terms.Stopwords.<init>(Stopwords.java:87) [TerrierTest-0.0.1-SNAPSHOT.jar:na]
          at org.terrier.terms.Stopwords.<init>(Stopwords.java:70) [TerrierTest-0.0.1-SNAPSHOT.jar:na]
          at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) [na:1.8.0_65]
          at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) [na:1.8.0_65]
          at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) [na:1.8.0_65]
          at java.lang.reflect.Constructor.newInstance(Constructor.java:422) [na:1.8.0_65]
          at org.terrier.realtime.memory.MemoryIndex.load_pipeline(MemoryIndex.java:773) [TerrierTest-0.0.1-SNAPSHOT.jar:na]
          at org.terrier.realtime.memory.MemoryIndex.<init>(MemoryIndex.java:146) [TerrierTest-0.0.1-SNAPSHOT.jar:na]
          at IndexDocument.main(IndexDocument.java:25) [TerrierTest-0.0.1-SNAPSHOT.jar:na]
          13:21:25 ERROR [main] - [Stopwords]- Error: Empty stopwords file was used (resource:/stopword-list.txt)

          Show
          richardm Richard McCreadie added a comment - Stopword list is not found when importing Terrier using maven. WARNING: The file terrier.properties was not found at location /etc/terrier.properties Assuming the value of terrier.home from the corresponding system property. Please ensure that the property terrier.home is specified in the file terrier.properties, or as a system property in the command line. 13:21:25 DEBUG [main] - [FixedSizeTextFactory] - FixedSizeTextFactory: maxKeyWrittenSize=61 for term of size 20 13:21:25 ERROR [main] - [Stopwords] - Errror: Input/Output Exception while reading stopword list (resource:/stopword-list.txt) : Stack trace follows. java.io.FileNotFoundException: No file system for resource:/stopword-list.txt at org.terrier.utility.Files.openFile(Files.java:304) ~ [TerrierTest-0.0.1-SNAPSHOT.jar:na] at org.terrier.utility.Files.openFileReader(Files.java:621) ~ [TerrierTest-0.0.1-SNAPSHOT.jar:na] at org.terrier.utility.Files.openFileReader(Files.java:607) ~ [TerrierTest-0.0.1-SNAPSHOT.jar:na] at org.terrier.terms.Stopwords.loadStopwordsList(Stopwords.java:131) [TerrierTest-0.0.1-SNAPSHOT.jar:na] at org.terrier.terms.Stopwords.<init>(Stopwords.java:87) [TerrierTest-0.0.1-SNAPSHOT.jar:na] at org.terrier.terms.Stopwords.<init>(Stopwords.java:70) [TerrierTest-0.0.1-SNAPSHOT.jar:na] at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) [na:1.8.0_65] at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) [na:1.8.0_65] at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) [na:1.8.0_65] at java.lang.reflect.Constructor.newInstance(Constructor.java:422) [na:1.8.0_65] at org.terrier.realtime.memory.MemoryIndex.load_pipeline(MemoryIndex.java:773) [TerrierTest-0.0.1-SNAPSHOT.jar:na] at org.terrier.realtime.memory.MemoryIndex.<init>(MemoryIndex.java:146) [TerrierTest-0.0.1-SNAPSHOT.jar:na] at IndexDocument.main(IndexDocument.java:25) [TerrierTest-0.0.1-SNAPSHOT.jar:na] 13:21:25 ERROR [main] - [Stopwords] - Error: Empty stopwords file was used (resource:/stopword-list.txt)
          Hide
          craigm Craig Macdonald added a comment -

          Woops, didnt commit a change to Files.java. Works now. Commit 2e309fe0

          Craig

          Show
          craigm Craig Macdonald added a comment - Woops, didnt commit a change to Files.java. Works now. Commit 2e309fe0 Craig
          Hide
          richardm Richard McCreadie added a comment -

          works for me now

          Show
          richardm Richard McCreadie added a comment - works for me now
          Hide
          craigm Craig Macdonald added a comment -

          Woop. One more step towards a usable platform as a Maven artefact.

          Show
          craigm Craig Macdonald added a comment - Woop. One more step towards a usable platform as a Maven artefact.
          craigm Craig Macdonald made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]

            People

            • Assignee:
              richardm Richard McCreadie
              Reporter:
              craigm Craig Macdonald
            • Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: