From ae044e90a7546360b05ead3864394966a58adb55 Mon Sep 17 00:00:00 2001
From: Mateusz Kopeć <m.kopec@ipipan.waw.pl>
Date: Fri, 10 Jul 2015 12:40:39 +0200
Subject: [PATCH] Deployment settings and minor fix

---
 pom.xml                                                                       | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++
 src/main/java/pl/waw/ipipan/zil/core/md/Main.java                             | 13 ++++++++++---
 src/main/java/pl/waw/ipipan/zil/core/md/detection/zero/FeatureGeneration.java | 12 +++++++++---
 3 files changed, 70 insertions(+), 6 deletions(-)

diff --git a/pom.xml b/pom.xml
index 672f274..7215be8 100644
--- a/pom.xml
+++ b/pom.xml
@@ -15,6 +15,44 @@
 				</configuration>
 			</plugin>
 			<plugin>
+				<artifactId>maven-source-plugin</artifactId>
+				<executions>
+					<execution>
+						<id>attach-sources</id>
+						<phase>deploy</phase>
+						<goals>
+							<goal>jar-no-fork</goal>
+						</goals>
+					</execution>
+				</executions>
+			</plugin>
+			<plugin>
+				<artifactId>maven-javadoc-plugin</artifactId>
+				<executions>
+					<execution>
+						<id>attach-javadocs</id>
+						<phase>deploy</phase>
+						<goals>
+							<goal>jar</goal>
+						</goals>
+					</execution>
+				</executions>
+			</plugin>
+			<plugin>
+				<!-- explicitly define maven-deploy-plugin after other to force exec 
+					order -->
+				<artifactId>maven-deploy-plugin</artifactId>
+				<executions>
+					<execution>
+						<id>deploy</id>
+						<phase>deploy</phase>
+						<goals>
+							<goal>deploy</goal>
+						</goals>
+					</execution>
+				</executions>
+			</plugin>
+			<plugin>
 				<groupId>org.dstovall</groupId>
 				<artifactId>onejar-maven-plugin</artifactId>
 				<version>1.4.4</version>
@@ -58,6 +96,7 @@
 			<version>3.6.10</version>
 		</dependency>
 	</dependencies>
+
 	<repositories>
 		<repository>
 			<id>zil-maven-repo</id>
@@ -65,10 +104,22 @@
 			<url>http://maven.nlp.ipipan.waw.pl/content/repositories/snapshots</url>
 		</repository>
 	</repositories>
+
 	<pluginRepositories>
 		<pluginRepository>
 			<id>onejar-maven-plugin.googlecode.com</id>
 			<url>http://onejar-maven-plugin.googlecode.com/svn/mavenrepo</url>
 		</pluginRepository>
 	</pluginRepositories>
+
+	<distributionManagement>
+		<repository>
+			<id>deployment</id>
+			<url>http://maven.nlp.ipipan.waw.pl/content/repositories/releases/</url>
+		</repository>
+		<snapshotRepository>
+			<id>deployment</id>
+			<url>http://maven.nlp.ipipan.waw.pl/content/repositories/snapshots/</url>
+		</snapshotRepository>
+	</distributionManagement>
 </project>
diff --git a/src/main/java/pl/waw/ipipan/zil/core/md/Main.java b/src/main/java/pl/waw/ipipan/zil/core/md/Main.java
index bd37adf..30d63dc 100644
--- a/src/main/java/pl/waw/ipipan/zil/core/md/Main.java
+++ b/src/main/java/pl/waw/ipipan/zil/core/md/Main.java
@@ -42,7 +42,7 @@ public class Main {
 	 * Main method for detecting mentions in corpus encoded in Tei format.
 	 * 
 	 * @param args
-	 * @throws TEIException
+	 *            arguments
 	 */
 	public static void main(String[] args) {
 
@@ -103,10 +103,14 @@ public class Main {
 	 * similar directory structure in the output corpus directory.
 	 * 
 	 * @param inputCorpusDir
+	 *            input corpus directory
 	 * @param outputCorpusDir
+	 *            output corpus directory
 	 * @param textDir
-	 * @return
+	 *            input text dir
+	 * @return target text dir
 	 * @throws IOException
+	 *             when an error occurs
 	 */
 	private static File createTargetTextDir(File inputCorpusDir, File outputCorpusDir, File textDir) throws IOException {
 		String relativeDirPath = textDir.toString().substring(inputCorpusDir.toString().length());
@@ -122,7 +126,9 @@ public class Main {
 	 * annotation.
 	 * 
 	 * @param thriftText
+	 *            text to annotate with mentions
 	 * @throws MultiserviceException
+	 *             when an error occures
 	 */
 	public static void annotateThriftText(TText thriftText) throws MultiserviceException {
 		Text responseText = ThriftLoader.loadTextFromThrift(thriftText);
@@ -135,8 +141,9 @@ public class Main {
 	 * annotation. This method does not save this Tei text on disk.
 	 * 
 	 * @param teiText
-	 * @param zeroSubjectModel
+	 *            text to annotate with mentions
 	 * @throws TEIException
+	 *             when an error occurs
 	 */
 	public static void annotateTeiText(TEICorpusText teiText) throws TEIException {
 		Text responseText = TeiLoader.loadTextFromTei(teiText);
diff --git a/src/main/java/pl/waw/ipipan/zil/core/md/detection/zero/FeatureGeneration.java b/src/main/java/pl/waw/ipipan/zil/core/md/detection/zero/FeatureGeneration.java
index cae951b..2e46cd3 100644
--- a/src/main/java/pl/waw/ipipan/zil/core/md/detection/zero/FeatureGeneration.java
+++ b/src/main/java/pl/waw/ipipan/zil/core/md/detection/zero/FeatureGeneration.java
@@ -54,9 +54,9 @@ public class FeatureGeneration {
 		features.put("verbNumber", m.getChosenInterpretation().getNumber());
 		features.put("verbGender", m.getChosenInterpretation().getGender());
 		features.put("verbPerson", m.getChosenInterpretation().getPerson());
-		
+
 		features.put("quasi", quasiVerbs.contains(m.getChosenInterpretation().getBase()));
-	
+
 		features.put("nextCtag", getNeighbouringTag(s, m, 1));
 		features.put("prevCtag", getNeighbouringTag(s, m, -1));
 
@@ -217,6 +217,12 @@ public class FeatureGeneration {
 	 * - podział na klauzule: przecinki oraz spójniki bezprzecinkowe: i, albo,
 	 * lub (jak przy streszczeniach: w środku musi być czasownik w formie
 	 * osobowej),
+	 * 
+	 * @param s
+	 *            sentence
+	 * @param m2
+	 *            token
+	 * @return clause with the token
 	 */
 	public static List<Token> getClause(Sentence s, Token m2) {
 
@@ -310,7 +316,7 @@ public class FeatureGeneration {
 			// other verbs have number:person
 			String keywordPerson = keyword.getPerson();
 			String wordPerson = "ter"; // default
-			if (PRONOUN_TAGS.contains(candidate))
+			if (PRONOUN_TAGS.contains(candidate.getCtag()))
 				wordPerson = candidate.getPerson();
 			return wordPerson.equals(keywordPerson);
 		}
--
libgit2 0.22.2