[TR-457] Use stopword list as a resource (including resource file system) Created: 16/Dec/16  Updated: 21/Dec/16  Resolved: 21/Dec/16

Status: Resolved
Project: Terrier Core
Component/s: None
Affects Version/s: None
Fix Version/s: 4.2

Type: Task Priority: Major
Reporter: Craig Macdonald Assignee: Richard McCreadie
Resolution: Fixed  
Labels: None


 Description   
This is now in 4.2. Richard to verify.

 Comments   
Comment by Richard McCreadie [ 21/Dec/16 ]

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)

Comment by Craig Macdonald [ 21/Dec/16 ]

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

Craig

Comment by Richard McCreadie [ 21/Dec/16 ]

works for me now

Comment by Craig Macdonald [ 21/Dec/16 ]

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

Generated at Mon Dec 18 09:02:49 GMT 2017 using JIRA 7.1.1#71004-sha1:d6b2c0d9b7051e9fb5e4eb8ce177ca56d91d7bd8.