Commit 009e8120 authored by John David Osborne's avatar John David Osborne
Browse files

Reading resource from jar

parent f556ae67
......@@ -230,12 +230,14 @@ Text fields are useful for keyword search.
*/
public List<String> dropStopWords(List<String> allWords) throws URISyntaxException{
List<String> stops = new ArrayList<String>();
try (Stream<String> stream = Files.lines(Paths.get(getClass().getResource("/StopWords.txt").toURI()))) {
//try (Stream<String> stream = Files.lines(Paths.get(getClass().getResource("/StopWords.txt").toURI()))) {
try (Stream<String> stream = new BufferedReader(new InputStreamReader(ClassLoader.getSystemResourceAsStream("StopWords.txt"))).lines()){
stops = stream
.filter(line -> !line.startsWith("#"))
.collect(Collectors.toList());
} catch (IOException e) {
} catch (Exception e) {
e.printStackTrace();
System.exit(0);
}
allWords.removeAll(stops);
return allWords;
......
......@@ -19,7 +19,7 @@ WHERE mrconso.LAT='ENG'
-- AND mrconso.ts = 'P'
-- AND mrconso.stt = 'PF'
-- AND mrconso.ispref = 'Y'
-- AND tui IN ('T046')
AND tui IN ('T046')
-- AND tui IN ('T046','T047')
-- AND mrconso.cui='C0814136'
GROUP BY mrconso.cui
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment