Skip to content

Commit 467787d

Browse files
committed
Maven migration
1 parent 5e96a95 commit 467787d

File tree

126 files changed

+636278
-4
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

126 files changed

+636278
-4
lines changed

pom.xml

+54
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
5+
<modelVersion>4.0.0</modelVersion>
6+
7+
<groupId>nl.utwente</groupId>
8+
<artifactId>SimpleNLG-NL</artifactId>
9+
<version>1.0-SNAPSHOT</version>
10+
11+
<licenses>
12+
<license>
13+
<name>Mozilla Public License Version 1.1</name>
14+
<url>https://www.mozilla.org/en-US/MPL/1.1/</url>
15+
<distribution>repo</distribution>
16+
</license>
17+
</licenses>
18+
19+
<properties>
20+
<maven.compiler.source>1.8</maven.compiler.source>
21+
<maven.compiler.target>1.8</maven.compiler.target>
22+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
23+
</properties>
24+
25+
<dependencies>
26+
<dependency>
27+
<groupId>junit</groupId>
28+
<artifactId>junit</artifactId>
29+
<version>4.12</version>
30+
<scope>test</scope>
31+
</dependency>
32+
<dependency>
33+
<groupId>lexAccess2011dist</groupId>
34+
<artifactId>lexAccess2011dist</artifactId>
35+
<scope>system</scope>
36+
<systemPath>${basedir}/lib/lexAccess2011dist.jar</systemPath>
37+
<version>1.0</version>
38+
</dependency>
39+
<dependency>
40+
<groupId>lexCheck2006api</groupId>
41+
<artifactId>lexCheck2006api</artifactId>
42+
<scope>system</scope>
43+
<systemPath>${basedir}/lib/lexCheck2006api.jar</systemPath>
44+
<version>1.0</version>
45+
</dependency>
46+
<dependency>
47+
<groupId>lvg2011api</groupId>
48+
<artifactId>lvg2011api</artifactId>
49+
<scope>system</scope>
50+
<systemPath>${basedir}/lib/lvg2011api.jar</systemPath>
51+
<version>1.0</version>
52+
</dependency>
53+
</dependencies>
54+
</project>

src/simplenlg/lexicon/XMLLexicon.java renamed to src/main/java/simplenlg/lexicon/XMLLexicon.java

+9-4
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,10 @@
1919
package simplenlg.lexicon;
2020

2121
import java.io.File;
22+
import java.io.FileNotFoundException;
2223
import java.net.URI;
2324
import java.net.URISyntaxException;
25+
import java.net.URL;
2426
import java.util.ArrayList;
2527
import java.util.Arrays;
2628
import java.util.Collection;
@@ -130,17 +132,20 @@ public XMLLexicon(Language language) {
130132
String xmlLexiconFilePath;
131133
switch (language) {
132134
case FRENCH :
133-
xmlLexiconFilePath = "/simplenlg/lexicon/french/default-french-lexicon.xml";
135+
xmlLexiconFilePath = "default-french-lexicon.xml";
134136
break;
135137
case DUTCH :
136-
xmlLexiconFilePath = "/simplenlg/lexicon/dutch/dutch-lexicon-8k-default.xml";
138+
xmlLexiconFilePath = "default-dutch-lexicon.xml";
137139
break;
138140
default :
139-
xmlLexiconFilePath = "/simplenlg/lexicon/default-lexicon.xml";
141+
xmlLexiconFilePath = "default-lexicon.xml";
140142
}
141143

142144
try {
143-
createLexicon(getClass().getResource(xmlLexiconFilePath).toURI());
145+
URL resource = getClass().getClassLoader().getResource(xmlLexiconFilePath);
146+
147+
if (resource != null)
148+
createLexicon(resource.toURI());
144149
} catch (URISyntaxException ex) {
145150
System.out.println(ex.toString());
146151
}

0 commit comments

Comments
 (0)