Commit ae044e90a7546360b05ead3864394966a58adb55

Authored by Mateusz Kopeć
1 parent 1d1bcc9d

Deployment settings and minor fix

... ... @@ -15,6 +15,44 @@
15 15 </configuration>
16 16 </plugin>
17 17 <plugin>
  18 + <artifactId>maven-source-plugin</artifactId>
  19 + <executions>
  20 + <execution>
  21 + <id>attach-sources</id>
  22 + <phase>deploy</phase>
  23 + <goals>
  24 + <goal>jar-no-fork</goal>
  25 + </goals>
  26 + </execution>
  27 + </executions>
  28 + </plugin>
  29 + <plugin>
  30 + <artifactId>maven-javadoc-plugin</artifactId>
  31 + <executions>
  32 + <execution>
  33 + <id>attach-javadocs</id>
  34 + <phase>deploy</phase>
  35 + <goals>
  36 + <goal>jar</goal>
  37 + </goals>
  38 + </execution>
  39 + </executions>
  40 + </plugin>
  41 + <plugin>
  42 + <!-- explicitly define maven-deploy-plugin after other to force exec
  43 + order -->
  44 + <artifactId>maven-deploy-plugin</artifactId>
  45 + <executions>
  46 + <execution>
  47 + <id>deploy</id>
  48 + <phase>deploy</phase>
  49 + <goals>
  50 + <goal>deploy</goal>
  51 + </goals>
  52 + </execution>
  53 + </executions>
  54 + </plugin>
  55 + <plugin>
18 56 <groupId>org.dstovall</groupId>
19 57 <artifactId>onejar-maven-plugin</artifactId>
20 58 <version>1.4.4</version>
... ... @@ -58,6 +96,7 @@
58 96 <version>3.6.10</version>
59 97 </dependency>
60 98 </dependencies>
  99 +
61 100 <repositories>
62 101 <repository>
63 102 <id>zil-maven-repo</id>
... ... @@ -65,10 +104,22 @@
65 104 <url>http://maven.nlp.ipipan.waw.pl/content/repositories/snapshots</url>
66 105 </repository>
67 106 </repositories>
  107 +
68 108 <pluginRepositories>
69 109 <pluginRepository>
70 110 <id>onejar-maven-plugin.googlecode.com</id>
71 111 <url>http://onejar-maven-plugin.googlecode.com/svn/mavenrepo</url>
72 112 </pluginRepository>
73 113 </pluginRepositories>
  114 +
  115 + <distributionManagement>
  116 + <repository>
  117 + <id>deployment</id>
  118 + <url>http://maven.nlp.ipipan.waw.pl/content/repositories/releases/</url>
  119 + </repository>
  120 + <snapshotRepository>
  121 + <id>deployment</id>
  122 + <url>http://maven.nlp.ipipan.waw.pl/content/repositories/snapshots/</url>
  123 + </snapshotRepository>
  124 + </distributionManagement>
74 125 </project>
... ...
src/main/java/pl/waw/ipipan/zil/core/md/Main.java
... ... @@ -42,7 +42,7 @@ public class Main {
42 42 * Main method for detecting mentions in corpus encoded in Tei format.
43 43 *
44 44 * @param args
45   - * @throws TEIException
  45 + * arguments
46 46 */
47 47 public static void main(String[] args) {
48 48  
... ... @@ -103,10 +103,14 @@ public class Main {
103 103 * similar directory structure in the output corpus directory.
104 104 *
105 105 * @param inputCorpusDir
  106 + * input corpus directory
106 107 * @param outputCorpusDir
  108 + * output corpus directory
107 109 * @param textDir
108   - * @return
  110 + * input text dir
  111 + * @return target text dir
109 112 * @throws IOException
  113 + * when an error occurs
110 114 */
111 115 private static File createTargetTextDir(File inputCorpusDir, File outputCorpusDir, File textDir) throws IOException {
112 116 String relativeDirPath = textDir.toString().substring(inputCorpusDir.toString().length());
... ... @@ -122,7 +126,9 @@ public class Main {
122 126 * annotation.
123 127 *
124 128 * @param thriftText
  129 + * text to annotate with mentions
125 130 * @throws MultiserviceException
  131 + * when an error occures
126 132 */
127 133 public static void annotateThriftText(TText thriftText) throws MultiserviceException {
128 134 Text responseText = ThriftLoader.loadTextFromThrift(thriftText);
... ... @@ -135,8 +141,9 @@ public class Main {
135 141 * annotation. This method does not save this Tei text on disk.
136 142 *
137 143 * @param teiText
138   - * @param zeroSubjectModel
  144 + * text to annotate with mentions
139 145 * @throws TEIException
  146 + * when an error occurs
140 147 */
141 148 public static void annotateTeiText(TEICorpusText teiText) throws TEIException {
142 149 Text responseText = TeiLoader.loadTextFromTei(teiText);
... ...
src/main/java/pl/waw/ipipan/zil/core/md/detection/zero/FeatureGeneration.java
... ... @@ -54,9 +54,9 @@ public class FeatureGeneration {
54 54 features.put("verbNumber", m.getChosenInterpretation().getNumber());
55 55 features.put("verbGender", m.getChosenInterpretation().getGender());
56 56 features.put("verbPerson", m.getChosenInterpretation().getPerson());
57   -
  57 +
58 58 features.put("quasi", quasiVerbs.contains(m.getChosenInterpretation().getBase()));
59   -
  59 +
60 60 features.put("nextCtag", getNeighbouringTag(s, m, 1));
61 61 features.put("prevCtag", getNeighbouringTag(s, m, -1));
62 62  
... ... @@ -217,6 +217,12 @@ public class FeatureGeneration {
217 217 * - podział na klauzule: przecinki oraz spójniki bezprzecinkowe: i, albo,
218 218 * lub (jak przy streszczeniach: w środku musi być czasownik w formie
219 219 * osobowej),
  220 + *
  221 + * @param s
  222 + * sentence
  223 + * @param m2
  224 + * token
  225 + * @return clause with the token
220 226 */
221 227 public static List<Token> getClause(Sentence s, Token m2) {
222 228  
... ... @@ -310,7 +316,7 @@ public class FeatureGeneration {
310 316 // other verbs have number:person
311 317 String keywordPerson = keyword.getPerson();
312 318 String wordPerson = "ter"; // default
313   - if (PRONOUN_TAGS.contains(candidate))
  319 + if (PRONOUN_TAGS.contains(candidate.getCtag()))
314 320 wordPerson = candidate.getPerson();
315 321 return wordPerson.equals(keywordPerson);
316 322 }
... ...