Commit 0957eb598e9a855966d9d43a65296ce6b7d6a3e4
1 parent
df4d2865
Package renaming
Showing
49 changed files
with
206 additions
and
284 deletions
AbsSumAnnotator/.classpath deleted
1 | -<?xml version="1.0" encoding="UTF-8"?> | |
2 | -<classpath> | |
3 | - <classpathentry kind="src" output="target/classes" path="src/main/java"> | |
4 | - <attributes> | |
5 | - <attribute name="optional" value="true"/> | |
6 | - <attribute name="maven.pomderived" value="true"/> | |
7 | - </attributes> | |
8 | - </classpathentry> | |
9 | - <classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources"> | |
10 | - <attributes> | |
11 | - <attribute name="maven.pomderived" value="true"/> | |
12 | - </attributes> | |
13 | - </classpathentry> | |
14 | - <classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER"> | |
15 | - <attributes> | |
16 | - <attribute name="maven.pomderived" value="true"/> | |
17 | - </attributes> | |
18 | - </classpathentry> | |
19 | - <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/> | |
20 | - <classpathentry kind="output" path="target/classes"/> | |
21 | -</classpath> |
AbsSumAnnotator/.gitignore
AbsSumAnnotator/README.txt deleted
AbsSumAnnotator/pom.xml
1 | 1 | <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
2 | 2 | xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> |
3 | 3 | <modelVersion>4.0.0</modelVersion> |
4 | - <groupId>ipipan.atlas</groupId> | |
4 | + <groupId>pl.waw.ipipan.zil.summarizer</groupId> | |
5 | 5 | <artifactId>abssumannotator</artifactId> |
6 | - <version>0.1</version> | |
6 | + <version>1.0</version> | |
7 | 7 | <name>AbsSumAnnotator</name> |
8 | + <properties> | |
9 | + <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | |
10 | + </properties> | |
8 | 11 | <build> |
9 | 12 | <plugins> |
10 | 13 | <plugin> |
... | ... | @@ -12,7 +15,7 @@ |
12 | 15 | <configuration> |
13 | 16 | <archive> |
14 | 17 | <manifest> |
15 | - <mainClass>ipipan.atlas.abssumannotator.main.AbsSumAnnotator</mainClass> | |
18 | + <mainClass>pl.waw.ipipan.zil.summarizer.abssumannotator.main.AbsSumAnnotator</mainClass> | |
16 | 19 | </manifest> |
17 | 20 | </archive> |
18 | 21 | <descriptorRefs> |
... | ... | @@ -20,6 +23,14 @@ |
20 | 23 | </descriptorRefs> |
21 | 24 | </configuration> |
22 | 25 | </plugin> |
26 | + <plugin> | |
27 | + <artifactId>maven-compiler-plugin</artifactId> | |
28 | + <version>2.3.2</version> | |
29 | + <configuration> | |
30 | + <source>1.7</source> | |
31 | + <target>1.7</target> | |
32 | + </configuration> | |
33 | + </plugin> | |
23 | 34 | </plugins> |
24 | 35 | </build> |
25 | 36 | <dependencies> |
... | ... |
AbsSumAnnotator/src/main/java/pl/waw/ipipan/zil/summarization/abssumannotator/basic/Text.java renamed to AbsSumAnnotator/src/main/java/pl/waw/ipipan/zil/summarizer/abssumannotator/basic/Text.java
AbsSumAnnotator/src/main/java/pl/waw/ipipan/zil/summarization/abssumannotator/io/SummaryFileIO.java renamed to AbsSumAnnotator/src/main/java/pl/waw/ipipan/zil/summarizer/abssumannotator/io/SummaryFileIO.java
1 | -package pl.waw.ipipan.zil.summarization.abssumannotator.io; | |
2 | - | |
1 | +package pl.waw.ipipan.zil.summarizer.abssumannotator.io; | |
3 | 2 | |
4 | 3 | import java.io.BufferedReader; |
5 | 4 | import java.io.BufferedWriter; |
... | ... | @@ -14,8 +13,8 @@ import java.util.List; |
14 | 13 | |
15 | 14 | import org.apache.log4j.Logger; |
16 | 15 | |
17 | -import pl.waw.ipipan.zil.summarization.abssumannotator.basic.Text; | |
18 | -import pl.waw.ipipan.zil.summarization.abssumannotator.main.AbsSumAnnotator; | |
16 | +import pl.waw.ipipan.zil.summarizer.abssumannotator.basic.Text; | |
17 | +import pl.waw.ipipan.zil.summarizer.abssumannotator.main.AbsSumAnnotator; | |
19 | 18 | |
20 | 19 | public class SummaryFileIO { |
21 | 20 | |
... | ... |
AbsSumAnnotator/src/main/java/pl/waw/ipipan/zil/summarization/abssumannotator/main/AbsSumAnnotator.java renamed to AbsSumAnnotator/src/main/java/pl/waw/ipipan/zil/summarizer/abssumannotator/main/AbsSumAnnotator.java
1 | -package pl.waw.ipipan.zil.summarization.abssumannotator.main; | |
2 | - | |
1 | +package pl.waw.ipipan.zil.summarizer.abssumannotator.main; | |
3 | 2 | |
4 | 3 | import java.awt.Cursor; |
5 | 4 | import java.awt.Dimension; |
... | ... | @@ -37,14 +36,14 @@ import javax.swing.filechooser.FileFilter; |
37 | 36 | |
38 | 37 | import org.apache.log4j.Logger; |
39 | 38 | |
40 | -import pl.waw.ipipan.zil.summarization.abssumannotator.basic.Text; | |
41 | -import pl.waw.ipipan.zil.summarization.abssumannotator.io.SummaryFileIO; | |
39 | +import pl.waw.ipipan.zil.summarizer.abssumannotator.basic.Text; | |
40 | +import pl.waw.ipipan.zil.summarizer.abssumannotator.io.SummaryFileIO; | |
42 | 41 | |
43 | 42 | public class AbsSumAnnotator extends JFrame implements Runnable { |
44 | 43 | |
45 | 44 | public static final int SUMMARIES_COUNT = 3; |
46 | 45 | |
47 | - private static final String WINDOW_TITLE = "ASE v0.9"; | |
46 | + private static final String WINDOW_TITLE = "ASE v1.0"; | |
48 | 47 | |
49 | 48 | private static final long serialVersionUID = -3830790411182131318L; |
50 | 49 | |
... | ... | @@ -109,7 +108,7 @@ public class AbsSumAnnotator extends JFrame implements Runnable { |
109 | 108 | |
110 | 109 | JSplitPane splitPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT); |
111 | 110 | splitPane.setTopComponent(new JScrollPane(textPane, JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED, |
112 | - JScrollPane.HORIZONTAL_SCROLLBAR_NEVER)); | |
111 | + JScrollPane.HORIZONTAL_SCROLLBAR_NEVER)); | |
113 | 112 | splitPane.setBottomComponent(tabbedPane); |
114 | 113 | splitPane.setDividerLocation(TEXT_HEIGTH); |
115 | 114 | this.getContentPane().add(splitPane); |
... | ... | @@ -284,7 +283,7 @@ public class AbsSumAnnotator extends JFrame implements Runnable { |
284 | 283 | return true; |
285 | 284 | |
286 | 285 | int result = JOptionPane.showOptionDialog(this, "Do you want to save changes?", "Unsaved changes", |
287 | - JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.WARNING_MESSAGE, null, null, null); | |
286 | + JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.WARNING_MESSAGE, null, null, null); | |
288 | 287 | |
289 | 288 | if (result == JOptionPane.CANCEL_OPTION) |
290 | 289 | return false; |
... | ... |
AbsSumAnnotator/src/main/java/pl/waw/ipipan/zil/summarization/abssumannotator/main/MyTab.java renamed to AbsSumAnnotator/src/main/java/pl/waw/ipipan/zil/summarizer/abssumannotator/main/MyTab.java
1 | -package pl.waw.ipipan.zil.summarization.abssumannotator.main; | |
2 | - | |
1 | +package pl.waw.ipipan.zil.summarizer.abssumannotator.main; | |
3 | 2 | |
4 | 3 | import java.awt.BorderLayout; |
5 | 4 | import java.awt.Insets; |
... | ... | @@ -24,7 +23,7 @@ import javax.swing.undo.UndoManager; |
24 | 23 | |
25 | 24 | import org.apache.log4j.Logger; |
26 | 25 | |
27 | -import pl.waw.ipipan.zil.summarization.abssumannotator.basic.Text; | |
26 | +import pl.waw.ipipan.zil.summarizer.abssumannotator.basic.Text; | |
28 | 27 | |
29 | 28 | public class MyTab extends JPanel { |
30 | 29 | |
... | ... |
AbsSumAnnotator/src/main/java/log4j.properties renamed to AbsSumAnnotator/src/main/resources/log4j.properties
... | ... | @@ -2,4 +2,4 @@ log4j.appender.stderr=org.apache.log4j.ConsoleAppender |
2 | 2 | log4j.appender.stderr.layout=org.apache.log4j.PatternLayout |
3 | 3 | log4j.appender.stderr.layout.ConversionPattern=[%p] [%C{1}] %m%n |
4 | 4 | |
5 | -log4j.logger.pl.waw.ipipan.zil.summarization.abssumannotator=INFO, stderr | |
6 | 5 | \ No newline at end of file |
6 | +log4j.logger.pl.waw.ipipan.zil=INFO, stderr | |
7 | 7 | \ No newline at end of file |
... | ... |
ClauseAnnotator/.classpath deleted
1 | -<?xml version="1.0" encoding="UTF-8"?> | |
2 | -<classpath> | |
3 | - <classpathentry kind="src" output="target/classes" path="src/main/java"> | |
4 | - <attributes> | |
5 | - <attribute name="optional" value="true"/> | |
6 | - <attribute name="maven.pomderived" value="true"/> | |
7 | - </attributes> | |
8 | - </classpathentry> | |
9 | - <classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources"> | |
10 | - <attributes> | |
11 | - <attribute name="maven.pomderived" value="true"/> | |
12 | - </attributes> | |
13 | - </classpathentry> | |
14 | - <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"> | |
15 | - <attributes> | |
16 | - <attribute name="maven.pomderived" value="true"/> | |
17 | - </attributes> | |
18 | - </classpathentry> | |
19 | - <classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER"> | |
20 | - <attributes> | |
21 | - <attribute name="maven.pomderived" value="true"/> | |
22 | - </attributes> | |
23 | - </classpathentry> | |
24 | - <classpathentry kind="output" path="target/classes"/> | |
25 | -</classpath> |
ClauseAnnotator/.gitignore
ClauseAnnotator/pom.xml
1 | 1 | <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
2 | 2 | xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> |
3 | 3 | <modelVersion>4.0.0</modelVersion> |
4 | - <groupId>ipipan.atlas</groupId> | |
4 | + <groupId>pl.waw.ipipan.zil.summarizer</groupId> | |
5 | 5 | <artifactId>clauseannotator</artifactId> |
6 | - <version>0.1</version> | |
7 | - <name>Clauseannotator</name> | |
6 | + <version>1.0</version> | |
7 | + <name>ClauseAnnotator</name> | |
8 | + <properties> | |
9 | + <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | |
10 | + </properties> | |
8 | 11 | <build> |
9 | 12 | <plugins> |
10 | 13 | <plugin> |
... | ... | @@ -12,7 +15,7 @@ |
12 | 15 | <configuration> |
13 | 16 | <archive> |
14 | 17 | <manifest> |
15 | - <mainClass>ipipan.atlas.clauseannotator.main.Clauseannotator</mainClass> | |
18 | + <mainClass>pl.waw.ipipan.zil.summarizer.clauseannotator.main.ClauseAnnotator</mainClass> | |
16 | 19 | </manifest> |
17 | 20 | </archive> |
18 | 21 | <descriptorRefs> |
... | ... | @@ -20,6 +23,14 @@ |
20 | 23 | </descriptorRefs> |
21 | 24 | </configuration> |
22 | 25 | </plugin> |
26 | + <plugin> | |
27 | + <artifactId>maven-compiler-plugin</artifactId> | |
28 | + <version>2.3.2</version> | |
29 | + <configuration> | |
30 | + <source>1.7</source> | |
31 | + <target>1.7</target> | |
32 | + </configuration> | |
33 | + </plugin> | |
23 | 34 | </plugins> |
24 | 35 | </build> |
25 | 36 | <dependencies> |
... | ... |
ClauseAnnotator/src/main/java/pl/waw/ipipan/zil/summarization/clauseannotator/basic/Clause.java renamed to ClauseAnnotator/src/main/java/pl/waw/ipipan/zil/summarizer/clauseannotator/basic/Clause.java
ClauseAnnotator/src/main/java/pl/waw/ipipan/zil/summarization/clauseannotator/basic/Document.java renamed to ClauseAnnotator/src/main/java/pl/waw/ipipan/zil/summarizer/clauseannotator/basic/Document.java
ClauseAnnotator/src/main/java/pl/waw/ipipan/zil/summarization/clauseannotator/basic/Marker.java renamed to ClauseAnnotator/src/main/java/pl/waw/ipipan/zil/summarizer/clauseannotator/basic/Marker.java
ClauseAnnotator/src/main/java/pl/waw/ipipan/zil/summarization/clauseannotator/basic/Sentence.java renamed to ClauseAnnotator/src/main/java/pl/waw/ipipan/zil/summarizer/clauseannotator/basic/Sentence.java
ClauseAnnotator/src/main/java/pl/waw/ipipan/zil/summarization/clauseannotator/basic/Word.java renamed to ClauseAnnotator/src/main/java/pl/waw/ipipan/zil/summarizer/clauseannotator/basic/Word.java
1 | -package pl.waw.ipipan.zil.summarization.clauseannotator.basic; | |
1 | +package pl.waw.ipipan.zil.summarizer.clauseannotator.basic; | |
2 | 2 | |
3 | -import pl.waw.ipipan.zil.summarization.clauseannotator.main.Clauseannotator; | |
3 | +import pl.waw.ipipan.zil.summarizer.clauseannotator.main.ClauseAnnotator; | |
4 | 4 | |
5 | 5 | public class Word { |
6 | 6 | |
... | ... | @@ -50,9 +50,9 @@ public class Word { |
50 | 50 | } |
51 | 51 | |
52 | 52 | public boolean isVerb() { |
53 | - if (Clauseannotator.VERB_POS_REGEXP == null) | |
53 | + if (ClauseAnnotator.VERB_POS_REGEXP == null) | |
54 | 54 | return false; |
55 | - return pos.matches(Clauseannotator.VERB_POS_REGEXP); | |
55 | + return pos.matches(ClauseAnnotator.VERB_POS_REGEXP); | |
56 | 56 | } |
57 | 57 | |
58 | 58 | public Marker getMarker() { |
... | ... |
ClauseAnnotator/src/main/java/pl/waw/ipipan/zil/summarization/clauseannotator/io/IdGenerator.java renamed to ClauseAnnotator/src/main/java/pl/waw/ipipan/zil/summarizer/clauseannotator/io/IdGenerator.java
1 | -package pl.waw.ipipan.zil.summarization.clauseannotator.io; | |
1 | +package pl.waw.ipipan.zil.summarizer.clauseannotator.io; | |
2 | 2 | |
3 | 3 | import java.util.HashMap; |
4 | 4 | import java.util.Map; |
5 | 5 | |
6 | -import pl.waw.ipipan.zil.summarization.clauseannotator.basic.Clause; | |
7 | -import pl.waw.ipipan.zil.summarization.clauseannotator.basic.Marker; | |
8 | -import pl.waw.ipipan.zil.summarization.clauseannotator.basic.Sentence; | |
9 | -import pl.waw.ipipan.zil.summarization.clauseannotator.basic.Word; | |
10 | - | |
6 | +import pl.waw.ipipan.zil.summarizer.clauseannotator.basic.Clause; | |
7 | +import pl.waw.ipipan.zil.summarizer.clauseannotator.basic.Marker; | |
8 | +import pl.waw.ipipan.zil.summarizer.clauseannotator.basic.Sentence; | |
9 | +import pl.waw.ipipan.zil.summarizer.clauseannotator.basic.Word; | |
11 | 10 | |
12 | 11 | public class IdGenerator { |
13 | 12 | |
... | ... |
ClauseAnnotator/src/main/java/pl/waw/ipipan/zil/summarization/clauseannotator/io/XMLReader.java renamed to ClauseAnnotator/src/main/java/pl/waw/ipipan/zil/summarizer/clauseannotator/io/XMLReader.java
1 | -package pl.waw.ipipan.zil.summarization.clauseannotator.io; | |
2 | - | |
1 | +package pl.waw.ipipan.zil.summarizer.clauseannotator.io; | |
3 | 2 | |
4 | 3 | import java.io.File; |
5 | 4 | import java.io.FileInputStream; |
... | ... | @@ -14,11 +13,11 @@ import javax.xml.stream.XMLStreamReader; |
14 | 13 | import org.apache.log4j.Logger; |
15 | 14 | import org.codehaus.stax2.XMLInputFactory2; |
16 | 15 | |
17 | -import pl.waw.ipipan.zil.summarization.clauseannotator.basic.Clause; | |
18 | -import pl.waw.ipipan.zil.summarization.clauseannotator.basic.Document; | |
19 | -import pl.waw.ipipan.zil.summarization.clauseannotator.basic.Marker; | |
20 | -import pl.waw.ipipan.zil.summarization.clauseannotator.basic.Sentence; | |
21 | -import pl.waw.ipipan.zil.summarization.clauseannotator.basic.Word; | |
16 | +import pl.waw.ipipan.zil.summarizer.clauseannotator.basic.Clause; | |
17 | +import pl.waw.ipipan.zil.summarizer.clauseannotator.basic.Document; | |
18 | +import pl.waw.ipipan.zil.summarizer.clauseannotator.basic.Marker; | |
19 | +import pl.waw.ipipan.zil.summarizer.clauseannotator.basic.Sentence; | |
20 | +import pl.waw.ipipan.zil.summarizer.clauseannotator.basic.Word; | |
22 | 21 | |
23 | 22 | public class XMLReader { |
24 | 23 | |
... | ... | @@ -84,7 +83,7 @@ public class XMLReader { |
84 | 83 | |
85 | 84 | if (currentWord != null) |
86 | 85 | throw new Exception("Word starting before previous word finished in line: " |
87 | - + sr.getLocation().getLineNumber()); | |
86 | + + sr.getLocation().getLineNumber()); | |
88 | 87 | |
89 | 88 | currentWord = new Word(pos, lemma); |
90 | 89 | |
... | ... | @@ -104,7 +103,7 @@ public class XMLReader { |
104 | 103 | |
105 | 104 | if (currentSentence == null) |
106 | 105 | throw new Exception("Sentence ending before starting in line: " |
107 | - + sr.getLocation().getLineNumber()); | |
106 | + + sr.getLocation().getLineNumber()); | |
108 | 107 | |
109 | 108 | // for first-time read |
110 | 109 | if (currentClause != null) |
... | ... | @@ -122,7 +121,7 @@ public class XMLReader { |
122 | 121 | |
123 | 122 | if (currentWord == null) |
124 | 123 | throw new Exception("Word ending before starting in line: " |
125 | - + sr.getLocation().getLineNumber()); | |
124 | + + sr.getLocation().getLineNumber()); | |
126 | 125 | |
127 | 126 | if (currentClause == null) |
128 | 127 | throw new Exception("Word not in a clause in line: " + sr.getLocation().getLineNumber()); |
... | ... | @@ -133,7 +132,7 @@ public class XMLReader { |
133 | 132 | |
134 | 133 | if (currentWord.getPos() == null) |
135 | 134 | throw new Exception("Word without pos attribute in line: " |
136 | - + sr.getLocation().getLineNumber()); | |
135 | + + sr.getLocation().getLineNumber()); | |
137 | 136 | |
138 | 137 | currentClause.add(currentWord); |
139 | 138 | currentWord = null; |
... | ... | @@ -145,7 +144,7 @@ public class XMLReader { |
145 | 144 | |
146 | 145 | if (currentMarker == null) |
147 | 146 | throw new Exception("Marker ended before started in line: " |
148 | - + sr.getLocation().getLineNumber()); | |
147 | + + sr.getLocation().getLineNumber()); | |
149 | 148 | |
150 | 149 | currentMarker = null; |
151 | 150 | } |
... | ... | @@ -169,7 +168,7 @@ public class XMLReader { |
169 | 168 | Clause cont = id2Clause.get(contId); |
170 | 169 | if (cont == null) |
171 | 170 | throw new Exception("Clause with id: " + contId + " not found in line: " |
172 | - + sr.getLocation().getLineNumber()); | |
171 | + + sr.getLocation().getLineNumber()); | |
173 | 172 | |
174 | 173 | c.setContinuedClause(cont); |
175 | 174 | } |
... | ... |
ClauseAnnotator/src/main/java/pl/waw/ipipan/zil/summarization/clauseannotator/io/XMLWriter.java renamed to ClauseAnnotator/src/main/java/pl/waw/ipipan/zil/summarizer/clauseannotator/io/XMLWriter.java
1 | -package pl.waw.ipipan.zil.summarization.clauseannotator.io; | |
2 | - | |
1 | +package pl.waw.ipipan.zil.summarizer.clauseannotator.io; | |
3 | 2 | |
4 | 3 | import java.io.BufferedWriter; |
5 | 4 | import java.io.File; |
... | ... | @@ -13,10 +12,10 @@ import javax.xml.stream.XMLStreamWriter; |
13 | 12 | import org.apache.log4j.Logger; |
14 | 13 | import org.codehaus.stax2.XMLOutputFactory2; |
15 | 14 | |
16 | -import pl.waw.ipipan.zil.summarization.clauseannotator.basic.Clause; | |
17 | -import pl.waw.ipipan.zil.summarization.clauseannotator.basic.Marker; | |
18 | -import pl.waw.ipipan.zil.summarization.clauseannotator.basic.Sentence; | |
19 | -import pl.waw.ipipan.zil.summarization.clauseannotator.basic.Word; | |
15 | +import pl.waw.ipipan.zil.summarizer.clauseannotator.basic.Clause; | |
16 | +import pl.waw.ipipan.zil.summarizer.clauseannotator.basic.Marker; | |
17 | +import pl.waw.ipipan.zil.summarizer.clauseannotator.basic.Sentence; | |
18 | +import pl.waw.ipipan.zil.summarizer.clauseannotator.basic.Word; | |
20 | 19 | |
21 | 20 | public class XMLWriter { |
22 | 21 | |
... | ... | @@ -26,9 +25,9 @@ public class XMLWriter { |
26 | 25 | private static final String INDENT = " "; |
27 | 26 | |
28 | 27 | public static boolean saveFile(File targetFile, List<Sentence> sentences) { |
29 | - return saveFile(targetFile, sentences, false, false); | |
28 | + return saveFile(targetFile, sentences, false, false); | |
30 | 29 | } |
31 | - | |
30 | + | |
32 | 31 | public static boolean saveFile(File targetFile, List<Sentence> sentences, boolean omitClauses, boolean omitMarkers) { |
33 | 32 | logger.info("Saving sentences in file: " + targetFile); |
34 | 33 | BufferedWriter bw = null; |
... | ... |
ClauseAnnotator/src/main/java/pl/waw/ipipan/zil/summarization/clauseannotator/main/BottomPanel.java renamed to ClauseAnnotator/src/main/java/pl/waw/ipipan/zil/summarizer/clauseannotator/main/BottomPanel.java
1 | -package pl.waw.ipipan.zil.summarization.clauseannotator.main; | |
2 | - | |
1 | +package pl.waw.ipipan.zil.summarizer.clauseannotator.main; | |
3 | 2 | |
4 | 3 | import java.awt.Component; |
5 | 4 | import java.awt.GridBagConstraints; |
... | ... | @@ -15,9 +14,9 @@ import javax.swing.JPanel; |
15 | 14 | |
16 | 15 | import org.apache.log4j.Logger; |
17 | 16 | |
18 | -import pl.waw.ipipan.zil.summarization.clauseannotator.basic.Clause; | |
19 | -import pl.waw.ipipan.zil.summarization.clauseannotator.basic.Marker; | |
20 | -import pl.waw.ipipan.zil.summarization.clauseannotator.basic.Word; | |
17 | +import pl.waw.ipipan.zil.summarizer.clauseannotator.basic.Clause; | |
18 | +import pl.waw.ipipan.zil.summarizer.clauseannotator.basic.Marker; | |
19 | +import pl.waw.ipipan.zil.summarizer.clauseannotator.basic.Word; | |
21 | 20 | |
22 | 21 | public class BottomPanel extends JPanel implements ItemListener { |
23 | 22 | |
... | ... |
ClauseAnnotator/src/main/java/pl/waw/ipipan/zil/summarization/clauseannotator/main/Clauseannotator.java renamed to ClauseAnnotator/src/main/java/pl/waw/ipipan/zil/summarizer/clauseannotator/main/ClauseAnnotator.java
1 | -package pl.waw.ipipan.zil.summarization.clauseannotator.main; | |
2 | - | |
1 | +package pl.waw.ipipan.zil.summarizer.clauseannotator.main; | |
3 | 2 | |
4 | 3 | import java.awt.Cursor; |
5 | 4 | import java.awt.Dimension; |
... | ... | @@ -32,17 +31,17 @@ import javax.swing.filechooser.FileFilter; |
32 | 31 | |
33 | 32 | import org.apache.log4j.Logger; |
34 | 33 | |
35 | -import pl.waw.ipipan.zil.summarization.clauseannotator.basic.Document; | |
36 | -import pl.waw.ipipan.zil.summarization.clauseannotator.io.XMLReader; | |
37 | -import pl.waw.ipipan.zil.summarization.clauseannotator.io.XMLWriter; | |
34 | +import pl.waw.ipipan.zil.summarizer.clauseannotator.basic.Document; | |
35 | +import pl.waw.ipipan.zil.summarizer.clauseannotator.io.XMLReader; | |
36 | +import pl.waw.ipipan.zil.summarizer.clauseannotator.io.XMLWriter; | |
38 | 37 | |
39 | -public class Clauseannotator extends JFrame implements Runnable { | |
38 | +public class ClauseAnnotator extends JFrame implements Runnable { | |
40 | 39 | |
41 | 40 | private static final String WINDOW_TITLE = "Clause and marker annotator"; |
42 | 41 | |
43 | 42 | private static final long serialVersionUID = -3830790411182131318L; |
44 | 43 | |
45 | - private static final Logger logger = Logger.getLogger(Clauseannotator.class); | |
44 | + private static final Logger logger = Logger.getLogger(ClauseAnnotator.class); | |
46 | 45 | |
47 | 46 | private static final int HEIGTH = 600; |
48 | 47 | private static final int WIDTH = 800; |
... | ... | @@ -62,10 +61,10 @@ public class Clauseannotator extends JFrame implements Runnable { |
62 | 61 | |
63 | 62 | public static void main(String[] args) { |
64 | 63 | if (args.length != 0 && args.length != 1) { |
65 | - logger.error("Wrong usage! Should be: java -jar " + Clauseannotator.class.getSimpleName() + " [input file]"); | |
64 | + logger.error("Wrong usage! Should be: java -jar " + ClauseAnnotator.class.getSimpleName() + " [input file]"); | |
66 | 65 | return; |
67 | 66 | } |
68 | - final Clauseannotator clauseannotator = new Clauseannotator(); | |
67 | + final ClauseAnnotator clauseannotator = new ClauseAnnotator(); | |
69 | 68 | try { |
70 | 69 | SwingUtilities.invokeAndWait(clauseannotator); |
71 | 70 | } catch (Exception e) { |
... | ... | @@ -89,7 +88,7 @@ public class Clauseannotator extends JFrame implements Runnable { |
89 | 88 | } |
90 | 89 | |
91 | 90 | private static void loadVerPosRegexp() { |
92 | - InputStream f = Clauseannotator.class.getClassLoader().getResourceAsStream(verbposregexpFilename); | |
91 | + InputStream f = ClauseAnnotator.class.getClassLoader().getResourceAsStream(verbposregexpFilename); | |
93 | 92 | if (f != null) { |
94 | 93 | String regex = null; |
95 | 94 | try { |
... | ... | @@ -227,7 +226,7 @@ public class Clauseannotator extends JFrame implements Runnable { |
227 | 226 | |
228 | 227 | JEditorPane editorPane = new JEditorPane(); |
229 | 228 | editorPane.setEditable(false); |
230 | - URL helpURL = Clauseannotator.class.getClassLoader().getResource("help.html"); | |
229 | + URL helpURL = ClauseAnnotator.class.getClassLoader().getResource("help.html"); | |
231 | 230 | if (helpURL != null) { |
232 | 231 | try { |
233 | 232 | editorPane.setPage(helpURL); |
... | ... | @@ -301,9 +300,9 @@ public class Clauseannotator extends JFrame implements Runnable { |
301 | 300 | |
302 | 301 | private class MainWindowListener extends WindowAdapter { |
303 | 302 | |
304 | - private Clauseannotator summanotator; | |
303 | + private ClauseAnnotator summanotator; | |
305 | 304 | |
306 | - public MainWindowListener(Clauseannotator sumannotator) { | |
305 | + public MainWindowListener(ClauseAnnotator sumannotator) { | |
307 | 306 | this.summanotator = sumannotator; |
308 | 307 | } |
309 | 308 | |
... | ... |
ClauseAnnotator/src/main/java/pl/waw/ipipan/zil/summarization/clauseannotator/main/FixIds.java renamed to ClauseAnnotator/src/main/java/pl/waw/ipipan/zil/summarizer/clauseannotator/main/FixIds.java
1 | -package pl.waw.ipipan.zil.summarization.clauseannotator.main; | |
2 | - | |
1 | +package pl.waw.ipipan.zil.summarizer.clauseannotator.main; | |
3 | 2 | |
4 | 3 | import java.io.File; |
5 | 4 | |
6 | -import pl.waw.ipipan.zil.summarization.clauseannotator.basic.Document; | |
7 | -import pl.waw.ipipan.zil.summarization.clauseannotator.io.XMLReader; | |
8 | -import pl.waw.ipipan.zil.summarization.clauseannotator.io.XMLWriter; | |
5 | +import pl.waw.ipipan.zil.summarizer.clauseannotator.basic.Document; | |
6 | +import pl.waw.ipipan.zil.summarizer.clauseannotator.io.XMLReader; | |
7 | +import pl.waw.ipipan.zil.summarizer.clauseannotator.io.XMLWriter; | |
9 | 8 | |
10 | 9 | public class FixIds { |
11 | 10 | |
12 | 11 | public static void main(String[] args) { |
13 | - | |
12 | + | |
14 | 13 | File dir = new File(args[0]); |
15 | 14 | for (File f : dir.listFiles()) { |
16 | 15 | Document doc = new Document(); |
... | ... |
ClauseAnnotator/src/main/java/pl/waw/ipipan/zil/summarization/clauseannotator/main/MainDocument.java renamed to ClauseAnnotator/src/main/java/pl/waw/ipipan/zil/summarizer/clauseannotator/main/MainDocument.java
1 | -package pl.waw.ipipan.zil.summarization.clauseannotator.main; | |
2 | - | |
1 | +package pl.waw.ipipan.zil.summarizer.clauseannotator.main; | |
3 | 2 | |
4 | 3 | import java.awt.event.KeyEvent; |
5 | 4 | import java.awt.event.KeyListener; |
... | ... | @@ -17,10 +16,10 @@ import javax.swing.text.SimpleAttributeSet; |
17 | 16 | |
18 | 17 | import org.apache.log4j.Logger; |
19 | 18 | |
20 | -import pl.waw.ipipan.zil.summarization.clauseannotator.basic.Clause; | |
21 | -import pl.waw.ipipan.zil.summarization.clauseannotator.basic.Marker; | |
22 | -import pl.waw.ipipan.zil.summarization.clauseannotator.basic.Sentence; | |
23 | -import pl.waw.ipipan.zil.summarization.clauseannotator.basic.Word; | |
19 | +import pl.waw.ipipan.zil.summarizer.clauseannotator.basic.Clause; | |
20 | +import pl.waw.ipipan.zil.summarizer.clauseannotator.basic.Marker; | |
21 | +import pl.waw.ipipan.zil.summarizer.clauseannotator.basic.Sentence; | |
22 | +import pl.waw.ipipan.zil.summarizer.clauseannotator.basic.Word; | |
24 | 23 | |
25 | 24 | public class MainDocument extends DefaultStyledDocument implements CaretListener, KeyListener { |
26 | 25 | |
... | ... |
ClauseAnnotator/src/main/java/pl/waw/ipipan/zil/summarization/clauseannotator/main/MainSplitPanel.java renamed to ClauseAnnotator/src/main/java/pl/waw/ipipan/zil/summarizer/clauseannotator/main/MainSplitPanel.java
1 | -package pl.waw.ipipan.zil.summarization.clauseannotator.main; | |
2 | - | |
1 | +package pl.waw.ipipan.zil.summarizer.clauseannotator.main; | |
3 | 2 | |
4 | 3 | import java.util.List; |
5 | 4 | |
... | ... | @@ -8,21 +7,21 @@ import javax.swing.JSplitPane; |
8 | 7 | |
9 | 8 | import org.apache.log4j.Logger; |
10 | 9 | |
11 | -import pl.waw.ipipan.zil.summarization.clauseannotator.basic.Marker; | |
12 | -import pl.waw.ipipan.zil.summarization.clauseannotator.basic.Sentence; | |
13 | -import pl.waw.ipipan.zil.summarization.clauseannotator.basic.Word; | |
10 | +import pl.waw.ipipan.zil.summarizer.clauseannotator.basic.Marker; | |
11 | +import pl.waw.ipipan.zil.summarizer.clauseannotator.basic.Sentence; | |
12 | +import pl.waw.ipipan.zil.summarizer.clauseannotator.basic.Word; | |
14 | 13 | |
15 | 14 | public class MainSplitPanel extends JSplitPane { |
16 | 15 | |
17 | 16 | private static final long serialVersionUID = 3656861958564714263L; |
18 | 17 | private static final Logger logger = Logger.getLogger(MainSplitPanel.class); |
19 | 18 | |
20 | - private Clauseannotator clauseannotator; | |
19 | + private ClauseAnnotator clauseannotator; | |
21 | 20 | |
22 | 21 | private MainTextPane mainTextPane; |
23 | 22 | private BottomPanel bottomPanel; |
24 | 23 | |
25 | - public MainSplitPanel(Clauseannotator clauseannotator) { | |
24 | + public MainSplitPanel(ClauseAnnotator clauseannotator) { | |
26 | 25 | super(JSplitPane.VERTICAL_SPLIT); |
27 | 26 | |
28 | 27 | this.clauseannotator = clauseannotator; |
... | ... |
ClauseAnnotator/src/main/java/pl/waw/ipipan/zil/summarization/clauseannotator/main/MainTextPane.java renamed to ClauseAnnotator/src/main/java/pl/waw/ipipan/zil/summarizer/clauseannotator/main/MainTextPane.java
1 | -package pl.waw.ipipan.zil.summarization.clauseannotator.main; | |
2 | - | |
1 | +package pl.waw.ipipan.zil.summarizer.clauseannotator.main; | |
3 | 2 | |
4 | 3 | import java.awt.Insets; |
5 | 4 | import java.util.List; |
... | ... | @@ -8,10 +7,10 @@ import javax.swing.JTextPane; |
8 | 7 | |
9 | 8 | import org.apache.log4j.Logger; |
10 | 9 | |
11 | -import pl.waw.ipipan.zil.summarization.clauseannotator.basic.Clause; | |
12 | -import pl.waw.ipipan.zil.summarization.clauseannotator.basic.Marker; | |
13 | -import pl.waw.ipipan.zil.summarization.clauseannotator.basic.Sentence; | |
14 | -import pl.waw.ipipan.zil.summarization.clauseannotator.basic.Word; | |
10 | +import pl.waw.ipipan.zil.summarizer.clauseannotator.basic.Clause; | |
11 | +import pl.waw.ipipan.zil.summarizer.clauseannotator.basic.Marker; | |
12 | +import pl.waw.ipipan.zil.summarizer.clauseannotator.basic.Sentence; | |
13 | +import pl.waw.ipipan.zil.summarizer.clauseannotator.basic.Word; | |
15 | 14 | |
16 | 15 | public class MainTextPane extends JTextPane { |
17 | 16 | |
... | ... | @@ -191,8 +190,8 @@ public class MainTextPane extends JTextPane { |
191 | 190 | Clause c = selectedWord.getClause(); |
192 | 191 | Sentence s = c.getSentence(); |
193 | 192 | logger.info("Splitting sentence: " + s + " starting from word: " + selectedWord); |
194 | - | |
195 | - s.getDocument().splitSentence(s, selectedWord); | |
193 | + | |
194 | + s.getDocument().splitSentence(s, selectedWord); | |
196 | 195 | |
197 | 196 | reloadSentences(); |
198 | 197 | |
... | ... |
ClauseAnnotator/src/main/java/pl/waw/ipipan/zil/summarization/clauseannotator/main/Styles.java renamed to ClauseAnnotator/src/main/java/pl/waw/ipipan/zil/summarizer/clauseannotator/main/Styles.java
1 | -package pl.waw.ipipan.zil.summarization.clauseannotator.main; | |
2 | - | |
1 | +package pl.waw.ipipan.zil.summarizer.clauseannotator.main; | |
3 | 2 | |
4 | 3 | import java.awt.Color; |
5 | 4 | |
6 | 5 | import javax.swing.text.SimpleAttributeSet; |
7 | 6 | import javax.swing.text.StyleConstants; |
8 | 7 | |
9 | -import pl.waw.ipipan.zil.summarization.clauseannotator.basic.Word; | |
8 | +import pl.waw.ipipan.zil.summarizer.clauseannotator.basic.Word; | |
10 | 9 | |
11 | 10 | public class Styles { |
12 | 11 | |
... | ... |
ClauseAnnotator/src/main/java/log4j.properties renamed to ClauseAnnotator/src/main/resources/log4j.properties
... | ... | @@ -2,4 +2,4 @@ log4j.appender.stderr=org.apache.log4j.ConsoleAppender |
2 | 2 | log4j.appender.stderr.layout=org.apache.log4j.PatternLayout |
3 | 3 | log4j.appender.stderr.layout.ConversionPattern=[%p] [%C{1}] %m%n |
4 | 4 | |
5 | -log4j.logger.pl.waw.ipipan.zil.summarization.clauseannotator=INFO, stderr | |
6 | 5 | \ No newline at end of file |
6 | +log4j.logger.pl.waw.ipipan.zil=INFO, stderr | |
7 | 7 | \ No newline at end of file |
... | ... |
ClauseSumAnnotator/.classpath deleted
1 | -<?xml version="1.0" encoding="UTF-8"?> | |
2 | -<classpath> | |
3 | - <classpathentry kind="src" output="target/classes" path="src/main/java"> | |
4 | - <attributes> | |
5 | - <attribute name="optional" value="true"/> | |
6 | - <attribute name="maven.pomderived" value="true"/> | |
7 | - </attributes> | |
8 | - </classpathentry> | |
9 | - <classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources"> | |
10 | - <attributes> | |
11 | - <attribute name="maven.pomderived" value="true"/> | |
12 | - </attributes> | |
13 | - </classpathentry> | |
14 | - <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"> | |
15 | - <attributes> | |
16 | - <attribute name="maven.pomderived" value="true"/> | |
17 | - </attributes> | |
18 | - </classpathentry> | |
19 | - <classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER"> | |
20 | - <attributes> | |
21 | - <attribute name="maven.pomderived" value="true"/> | |
22 | - </attributes> | |
23 | - </classpathentry> | |
24 | - <classpathentry kind="output" path="target/classes"/> | |
25 | -</classpath> |
ClauseSumAnnotator/.gitignore
ClauseSumAnnotator/pom.xml
1 | 1 | <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
2 | 2 | xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> |
3 | 3 | <modelVersion>4.0.0</modelVersion> |
4 | - <groupId>ipipan.atlas</groupId> | |
5 | - <artifactId>sumannotator</artifactId> | |
6 | - <version>0.1</version> | |
7 | - <name>Sumannotator</name> | |
4 | + <groupId>pl.waw.ipipan.zil.summarizer</groupId> | |
5 | + <artifactId>clausesumannotator</artifactId> | |
6 | + <version>1.0</version> | |
7 | + <name>ClauseSumAnnotator</name> | |
8 | + <properties> | |
9 | + <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | |
10 | + </properties> | |
8 | 11 | <build> |
9 | 12 | <plugins> |
10 | 13 | <plugin> |
... | ... | @@ -12,7 +15,7 @@ |
12 | 15 | <configuration> |
13 | 16 | <archive> |
14 | 17 | <manifest> |
15 | - <mainClass>ipipan.atlas.sumannotator.main.Sumannotator</mainClass> | |
18 | + <mainClass>pl.waw.ipipan.zil.summarizer.clausesumannotator.main.ClauseSumAnnotator</mainClass> | |
16 | 19 | </manifest> |
17 | 20 | </archive> |
18 | 21 | <descriptorRefs> |
... | ... | @@ -20,6 +23,14 @@ |
20 | 23 | </descriptorRefs> |
21 | 24 | </configuration> |
22 | 25 | </plugin> |
26 | + <plugin> | |
27 | + <artifactId>maven-compiler-plugin</artifactId> | |
28 | + <version>2.3.2</version> | |
29 | + <configuration> | |
30 | + <source>1.7</source> | |
31 | + <target>1.7</target> | |
32 | + </configuration> | |
33 | + </plugin> | |
23 | 34 | </plugins> |
24 | 35 | </build> |
25 | 36 | <dependencies> |
... | ... |
ClauseSumAnnotator/src/main/java/pl/waw/ipipan/zil/summarization/clausesumannotator/basic/Clause.java renamed to ClauseSumAnnotator/src/main/java/pl/waw/ipipan/zil/summarizer/clausesumannotator/basic/Clause.java
ClauseSumAnnotator/src/main/java/pl/waw/ipipan/zil/summarization/clausesumannotator/basic/Word.java renamed to ClauseSumAnnotator/src/main/java/pl/waw/ipipan/zil/summarizer/clausesumannotator/basic/Word.java
ClauseSumAnnotator/src/main/java/pl/waw/ipipan/zil/summarization/clausesumannotator/io/SummaryFileIO.java renamed to ClauseSumAnnotator/src/main/java/pl/waw/ipipan/zil/summarizer/clausesumannotator/io/SummaryFileIO.java
1 | -package pl.waw.ipipan.zil.summarization.clausesumannotator.io; | |
2 | - | |
1 | +package pl.waw.ipipan.zil.summarizer.clausesumannotator.io; | |
3 | 2 | |
4 | 3 | import java.io.BufferedReader; |
5 | 4 | import java.io.BufferedWriter; |
... | ... | @@ -15,8 +14,8 @@ import javax.swing.JTabbedPane; |
15 | 14 | |
16 | 15 | import org.apache.log4j.Logger; |
17 | 16 | |
18 | -import pl.waw.ipipan.zil.summarization.clausesumannotator.basic.Clause; | |
19 | -import pl.waw.ipipan.zil.summarization.clausesumannotator.main.MyTab; | |
17 | +import pl.waw.ipipan.zil.summarizer.clausesumannotator.basic.Clause; | |
18 | +import pl.waw.ipipan.zil.summarizer.clausesumannotator.main.MyTab; | |
20 | 19 | |
21 | 20 | public class SummaryFileIO { |
22 | 21 | |
... | ... |
ClauseSumAnnotator/src/main/java/pl/waw/ipipan/zil/summarization/clausesumannotator/io/XMLReader.java renamed to ClauseSumAnnotator/src/main/java/pl/waw/ipipan/zil/summarizer/clausesumannotator/io/XMLReader.java
1 | -package pl.waw.ipipan.zil.summarization.clausesumannotator.io; | |
2 | - | |
1 | +package pl.waw.ipipan.zil.summarizer.clausesumannotator.io; | |
3 | 2 | |
4 | 3 | import java.io.File; |
5 | 4 | import java.io.FileInputStream; |
... | ... | @@ -12,8 +11,8 @@ import javax.xml.stream.XMLStreamReader; |
12 | 11 | import org.apache.log4j.Logger; |
13 | 12 | import org.codehaus.stax2.XMLInputFactory2; |
14 | 13 | |
15 | -import pl.waw.ipipan.zil.summarization.clausesumannotator.basic.Clause; | |
16 | -import pl.waw.ipipan.zil.summarization.clausesumannotator.basic.Word; | |
14 | +import pl.waw.ipipan.zil.summarizer.clausesumannotator.basic.Clause; | |
15 | +import pl.waw.ipipan.zil.summarizer.clausesumannotator.basic.Word; | |
17 | 16 | |
18 | 17 | public class XMLReader { |
19 | 18 | |
... | ... | @@ -46,10 +45,9 @@ public class XMLReader { |
46 | 45 | |
47 | 46 | if (cont == null) |
48 | 47 | cont = ""; |
49 | - | |
48 | + | |
50 | 49 | if (id == null) { |
51 | - error = "Clause without id in line: " | |
52 | - + sr.getLocation().getLineNumber(); | |
50 | + error = "Clause without id in line: " + sr.getLocation().getLineNumber(); | |
53 | 51 | break; |
54 | 52 | } |
55 | 53 | |
... | ... | @@ -85,7 +83,7 @@ public class XMLReader { |
85 | 83 | } |
86 | 84 | if (currentClause == null) { |
87 | 85 | error = "Word not inside a clause in line: " + sr.getLocation().getLineNumber(); |
88 | - break; | |
86 | + break; | |
89 | 87 | } |
90 | 88 | currentClause.add(currentWord); |
91 | 89 | currentWord = null; |
... | ... |
ClauseSumAnnotator/src/main/java/pl/waw/ipipan/zil/summarization/clausesumannotator/main/ClauseSumAnnotator.java renamed to ClauseSumAnnotator/src/main/java/pl/waw/ipipan/zil/summarizer/clausesumannotator/main/ClauseSumAnnotator.java
1 | -package pl.waw.ipipan.zil.summarization.clausesumannotator.main; | |
2 | - | |
1 | +package pl.waw.ipipan.zil.summarizer.clausesumannotator.main; | |
3 | 2 | |
4 | 3 | import java.awt.Cursor; |
5 | 4 | import java.awt.Dimension; |
... | ... | @@ -33,13 +32,13 @@ import javax.swing.filechooser.FileFilter; |
33 | 32 | |
34 | 33 | import org.apache.log4j.Logger; |
35 | 34 | |
36 | -import pl.waw.ipipan.zil.summarization.clausesumannotator.basic.Clause; | |
37 | -import pl.waw.ipipan.zil.summarization.clausesumannotator.io.SummaryFileIO; | |
38 | -import pl.waw.ipipan.zil.summarization.clausesumannotator.io.XMLReader; | |
35 | +import pl.waw.ipipan.zil.summarizer.clausesumannotator.basic.Clause; | |
36 | +import pl.waw.ipipan.zil.summarizer.clausesumannotator.io.SummaryFileIO; | |
37 | +import pl.waw.ipipan.zil.summarizer.clausesumannotator.io.XMLReader; | |
39 | 38 | |
40 | 39 | public class ClauseSumAnnotator extends JFrame implements Runnable, MyTabChangeListener { |
41 | 40 | |
42 | - private static final String WINDOW_TITLE = "Extraction summary creator"; | |
41 | + private static final String WINDOW_TITLE = "Clause-extraction summary annotator"; | |
43 | 42 | |
44 | 43 | private static final long serialVersionUID = -3830790411182131318L; |
45 | 44 | |
... | ... | @@ -59,7 +58,8 @@ public class ClauseSumAnnotator extends JFrame implements Runnable, MyTabChangeL |
59 | 58 | |
60 | 59 | public static void main(String[] args) { |
61 | 60 | if (args.length != 0 && args.length != 1) { |
62 | - logger.error("Wrong usage! Should be: java -jar " + ClauseSumAnnotator.class.getSimpleName() + " [input file]"); | |
61 | + logger.error("Wrong usage! Should be: java -jar " + ClauseSumAnnotator.class.getSimpleName() | |
62 | + + " [input file]"); | |
63 | 63 | return; |
64 | 64 | } |
65 | 65 | final ClauseSumAnnotator summanno = new ClauseSumAnnotator(); |
... | ... | @@ -277,7 +277,7 @@ public class ClauseSumAnnotator extends JFrame implements Runnable, MyTabChangeL |
277 | 277 | return true; |
278 | 278 | |
279 | 279 | int result = JOptionPane.showOptionDialog(this, "Do you want to save changes?", "Unsaved changes", |
280 | - JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.WARNING_MESSAGE, null, null, null); | |
280 | + JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.WARNING_MESSAGE, null, null, null); | |
281 | 281 | |
282 | 282 | if (result == JOptionPane.CANCEL_OPTION) |
283 | 283 | return false; |
... | ... |
ClauseSumAnnotator/src/main/java/pl/waw/ipipan/zil/summarization/clausesumannotator/main/ClauseTable.java renamed to ClauseSumAnnotator/src/main/java/pl/waw/ipipan/zil/summarizer/clausesumannotator/main/ClauseTable.java
1 | -package pl.waw.ipipan.zil.summarization.clausesumannotator.main; | |
2 | - | |
1 | +package pl.waw.ipipan.zil.summarizer.clausesumannotator.main; | |
3 | 2 | |
4 | 3 | import java.awt.Color; |
5 | 4 | import java.awt.Component; |
... | ... | @@ -18,7 +17,7 @@ import javax.swing.ListSelectionModel; |
18 | 17 | import javax.swing.table.AbstractTableModel; |
19 | 18 | import javax.swing.table.TableCellRenderer; |
20 | 19 | |
21 | -import pl.waw.ipipan.zil.summarization.clausesumannotator.basic.Clause; | |
20 | +import pl.waw.ipipan.zil.summarizer.clausesumannotator.basic.Clause; | |
22 | 21 | |
23 | 22 | public class ClauseTable extends JTable implements MouseListener, KeyListener { |
24 | 23 | |
... | ... | @@ -161,7 +160,7 @@ public class ClauseTable extends JTable implements MouseListener, KeyListener { |
161 | 160 | |
162 | 161 | @Override |
163 | 162 | public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, |
164 | - boolean hasFocus, int row, int col) { | |
163 | + boolean hasFocus, int row, int col) { | |
165 | 164 | |
166 | 165 | String text = value.toString(); |
167 | 166 | setLineWrap(true); |
... | ... |
ClauseSumAnnotator/src/main/java/pl/waw/ipipan/zil/summarization/clausesumannotator/main/MyTab.java renamed to ClauseSumAnnotator/src/main/java/pl/waw/ipipan/zil/summarizer/clausesumannotator/main/MyTab.java
1 | -package pl.waw.ipipan.zil.summarization.clausesumannotator.main; | |
2 | - | |
1 | +package pl.waw.ipipan.zil.summarizer.clausesumannotator.main; | |
3 | 2 | |
4 | 3 | import java.awt.BorderLayout; |
5 | 4 | import java.awt.Dimension; |
... | ... | @@ -15,7 +14,7 @@ import javax.swing.JScrollPane; |
15 | 14 | import javax.swing.JSplitPane; |
16 | 15 | import javax.swing.JTextArea; |
17 | 16 | |
18 | -import pl.waw.ipipan.zil.summarization.clausesumannotator.basic.Clause; | |
17 | +import pl.waw.ipipan.zil.summarizer.clausesumannotator.basic.Clause; | |
19 | 18 | |
20 | 19 | public class MyTab extends JSplitPane implements MyTabChangeListener { |
21 | 20 | |
... | ... | @@ -104,7 +103,7 @@ public class MyTab extends JSplitPane implements MyTabChangeListener { |
104 | 103 | pb.setString(chosenWords + "/0 = -- %"); |
105 | 104 | else |
106 | 105 | pb.setString(chosenWords + "/" + targetSegmentCount + " = " + (100 * chosenWords / targetSegmentCount) |
107 | - + "%"); | |
106 | + + "%"); | |
108 | 107 | textArea.setText(sb.toString()); |
109 | 108 | |
110 | 109 | notifyAllListeners(); |
... | ... |
ClauseSumAnnotator/src/main/java/pl/waw/ipipan/zil/summarization/clausesumannotator/main/MyTabChangeListener.java renamed to ClauseSumAnnotator/src/main/java/pl/waw/ipipan/zil/summarizer/clausesumannotator/main/MyTabChangeListener.java
1 | -package pl.waw.ipipan.zil.summarization.clausesumannotator.main; | |
2 | - | |
1 | +package pl.waw.ipipan.zil.summarizer.clausesumannotator.main; | |
3 | 2 | |
4 | 3 | import java.util.List; |
5 | 4 | |
6 | -import pl.waw.ipipan.zil.summarization.clausesumannotator.basic.Clause; | |
5 | +import pl.waw.ipipan.zil.summarizer.clausesumannotator.basic.Clause; | |
7 | 6 | |
8 | 7 | public interface MyTabChangeListener { |
9 | 8 | |
... | ... |
ClauseSumAnnotator/src/main/java/log4j.properties renamed to ClauseSumAnnotator/src/main/resources/log4j.properties
... | ... | @@ -2,4 +2,4 @@ log4j.appender.stderr=org.apache.log4j.ConsoleAppender |
2 | 2 | log4j.appender.stderr.layout=org.apache.log4j.PatternLayout |
3 | 3 | log4j.appender.stderr.layout.ConversionPattern=[%p] [%C{1}] %m%n |
4 | 4 | |
5 | -log4j.logger.pl.waw.ipipan.zil.summarization.clausesumannotator=INFO, stderr | |
6 | 5 | \ No newline at end of file |
6 | +log4j.logger.pl.waw.ipipan.zil=INFO, stderr | |
7 | 7 | \ No newline at end of file |
... | ... |
ExtrSumAnnotator/.classpath deleted
1 | -<?xml version="1.0" encoding="UTF-8"?> | |
2 | -<classpath> | |
3 | - <classpathentry kind="src" output="target/classes" path="src/main/java"> | |
4 | - <attributes> | |
5 | - <attribute name="optional" value="true"/> | |
6 | - <attribute name="maven.pomderived" value="true"/> | |
7 | - </attributes> | |
8 | - </classpathentry> | |
9 | - <classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources"> | |
10 | - <attributes> | |
11 | - <attribute name="maven.pomderived" value="true"/> | |
12 | - </attributes> | |
13 | - </classpathentry> | |
14 | - <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"> | |
15 | - <attributes> | |
16 | - <attribute name="maven.pomderived" value="true"/> | |
17 | - </attributes> | |
18 | - </classpathentry> | |
19 | - <classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER"> | |
20 | - <attributes> | |
21 | - <attribute name="maven.pomderived" value="true"/> | |
22 | - </attributes> | |
23 | - </classpathentry> | |
24 | - <classpathentry kind="output" path="target/classes"/> | |
25 | -</classpath> |
ExtrSumAnnotator/.gitignore
ExtrSumAnnotator/pom.xml
1 | 1 | <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
2 | 2 | xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> |
3 | 3 | <modelVersion>4.0.0</modelVersion> |
4 | - <groupId>ipipan.atlas</groupId> | |
4 | + <groupId>pl.waw.ipipan.zil.summarizer</groupId> | |
5 | 5 | <artifactId>extrsumannotator</artifactId> |
6 | - <version>0.1</version> | |
6 | + <version>1.0</version> | |
7 | 7 | <name>ExtrSumAnnotator</name> |
8 | + <properties> | |
9 | + <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | |
10 | + </properties> | |
8 | 11 | <build> |
9 | 12 | <plugins> |
10 | 13 | <plugin> |
... | ... | @@ -12,7 +15,7 @@ |
12 | 15 | <configuration> |
13 | 16 | <archive> |
14 | 17 | <manifest> |
15 | - <mainClass>ipipan.atlas.extrsumannotator.main.ExtrSumAnnotator</mainClass> | |
18 | + <mainClass>pl.waw.ipipan.zil.summarizer.extrsumannotator.main.ExtrSumAnnotator</mainClass> | |
16 | 19 | </manifest> |
17 | 20 | </archive> |
18 | 21 | <descriptorRefs> |
... | ... | @@ -20,6 +23,14 @@ |
20 | 23 | </descriptorRefs> |
21 | 24 | </configuration> |
22 | 25 | </plugin> |
26 | + <plugin> | |
27 | + <artifactId>maven-compiler-plugin</artifactId> | |
28 | + <version>2.3.2</version> | |
29 | + <configuration> | |
30 | + <source>1.7</source> | |
31 | + <target>1.7</target> | |
32 | + </configuration> | |
33 | + </plugin> | |
23 | 34 | </plugins> |
24 | 35 | </build> |
25 | 36 | <dependencies> |
... | ... | @@ -34,4 +45,4 @@ |
34 | 45 | <version>3.1.1</version> |
35 | 46 | </dependency> |
36 | 47 | </dependencies> |
37 | -</project> | |
38 | 48 | \ No newline at end of file |
49 | +</project> | |
... | ... |
ExtrSumAnnotator/src/main/java/pl/waw/ipipan/zil/summarization/extrsumannotator/basic/Text.java renamed to ExtrSumAnnotator/src/main/java/pl/waw/ipipan/zil/summarizer/extrsumannotator/basic/Text.java
ExtrSumAnnotator/src/main/java/pl/waw/ipipan/zil/summarization/extrsumannotator/io/SummaryFileIO.java renamed to ExtrSumAnnotator/src/main/java/pl/waw/ipipan/zil/summarizer/extrsumannotator/io/SummaryFileIO.java
1 | -package pl.waw.ipipan.zil.summarization.extrsumannotator.io; | |
2 | - | |
1 | +package pl.waw.ipipan.zil.summarizer.extrsumannotator.io; | |
3 | 2 | |
4 | 3 | import java.io.BufferedReader; |
5 | 4 | import java.io.BufferedWriter; |
... | ... | @@ -17,8 +16,8 @@ import java.util.TreeSet; |
17 | 16 | |
18 | 17 | import org.apache.log4j.Logger; |
19 | 18 | |
20 | -import pl.waw.ipipan.zil.summarization.extrsumannotator.basic.Text; | |
21 | -import pl.waw.ipipan.zil.summarization.extrsumannotator.main.ExtrSumAnnotator; | |
19 | +import pl.waw.ipipan.zil.summarizer.extrsumannotator.basic.Text; | |
20 | +import pl.waw.ipipan.zil.summarizer.extrsumannotator.main.ExtrSumAnnotator; | |
22 | 21 | |
23 | 22 | public class SummaryFileIO { |
24 | 23 | |
... | ... |
ExtrSumAnnotator/src/main/java/pl/waw/ipipan/zil/summarization/extrsumannotator/main/ExtrSumAnnotator.java renamed to ExtrSumAnnotator/src/main/java/pl/waw/ipipan/zil/summarizer/extrsumannotator/main/ExtrSumAnnotator.java
1 | -package pl.waw.ipipan.zil.summarization.extrsumannotator.main; | |
2 | - | |
1 | +package pl.waw.ipipan.zil.summarizer.extrsumannotator.main; | |
3 | 2 | |
4 | 3 | import java.awt.Cursor; |
5 | 4 | import java.awt.Dimension; |
... | ... | @@ -38,12 +37,12 @@ import javax.swing.filechooser.FileFilter; |
38 | 37 | |
39 | 38 | import org.apache.log4j.Logger; |
40 | 39 | |
41 | -import pl.waw.ipipan.zil.summarization.extrsumannotator.basic.Text; | |
42 | -import pl.waw.ipipan.zil.summarization.extrsumannotator.io.SummaryFileIO; | |
40 | +import pl.waw.ipipan.zil.summarizer.extrsumannotator.basic.Text; | |
41 | +import pl.waw.ipipan.zil.summarizer.extrsumannotator.io.SummaryFileIO; | |
43 | 42 | |
44 | 43 | public class ExtrSumAnnotator extends JFrame implements Runnable, MyTabChangeListener { |
45 | 44 | |
46 | - private static final String WINDOW_TITLE = "ESE v0.9"; | |
45 | + private static final String WINDOW_TITLE = "ESE v1.0"; | |
47 | 46 | |
48 | 47 | private static final long serialVersionUID = -3830790411182131318L; |
49 | 48 | |
... | ... | @@ -68,7 +67,7 @@ public class ExtrSumAnnotator extends JFrame implements Runnable, MyTabChangeLis |
68 | 67 | public static void main(String[] args) { |
69 | 68 | if (args.length != 0 && args.length != 1) { |
70 | 69 | logger.error("Wrong usage! Should be: java -jar " + ExtrSumAnnotator.class.getSimpleName() |
71 | - + " [input file]"); | |
70 | + + " [input file]"); | |
72 | 71 | return; |
73 | 72 | } |
74 | 73 | final ExtrSumAnnotator summanno = new ExtrSumAnnotator(); |
... | ... | @@ -275,7 +274,7 @@ public class ExtrSumAnnotator extends JFrame implements Runnable, MyTabChangeLis |
275 | 274 | return true; |
276 | 275 | |
277 | 276 | int result = JOptionPane.showOptionDialog(this, "Do you want to save changes?", "Unsaved changes", |
278 | - JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.WARNING_MESSAGE, null, null, null); | |
277 | + JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.WARNING_MESSAGE, null, null, null); | |
279 | 278 | |
280 | 279 | if (result == JOptionPane.CANCEL_OPTION) |
281 | 280 | return false; |
... | ... |
ExtrSumAnnotator/src/main/java/pl/waw/ipipan/zil/summarization/extrsumannotator/main/MyTab.java renamed to ExtrSumAnnotator/src/main/java/pl/waw/ipipan/zil/summarizer/extrsumannotator/main/MyTab.java
1 | -package pl.waw.ipipan.zil.summarization.extrsumannotator.main; | |
2 | - | |
1 | +package pl.waw.ipipan.zil.summarizer.extrsumannotator.main; | |
3 | 2 | |
4 | 3 | import java.awt.BorderLayout; |
5 | 4 | import java.awt.Color; |
... | ... | @@ -34,7 +33,7 @@ import javax.swing.text.Highlighter.HighlightPainter; |
34 | 33 | |
35 | 34 | import org.apache.log4j.Logger; |
36 | 35 | |
37 | -import pl.waw.ipipan.zil.summarization.extrsumannotator.basic.Text; | |
36 | +import pl.waw.ipipan.zil.summarizer.extrsumannotator.basic.Text; | |
38 | 37 | |
39 | 38 | public class MyTab extends JSplitPane implements MyTabChangeListener { |
40 | 39 | |
... | ... | @@ -84,7 +83,7 @@ public class MyTab extends JSplitPane implements MyTabChangeListener { |
84 | 83 | |
85 | 84 | UndoAction undoAction = new UndoAction(); |
86 | 85 | this.getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT).put( |
87 | - KeyStroke.getKeyStroke(KeyEvent.VK_Z, KeyEvent.CTRL_MASK), "undo"); | |
86 | + KeyStroke.getKeyStroke(KeyEvent.VK_Z, KeyEvent.CTRL_MASK), "undo"); | |
88 | 87 | this.getActionMap().put("undo", undoAction); |
89 | 88 | undoButton = new JButton(undoAction); |
90 | 89 | undoButton.setEnabled(false); |
... | ... |
ExtrSumAnnotator/src/main/java/pl/waw/ipipan/zil/summarization/extrsumannotator/main/MyTabChangeListener.java renamed to ExtrSumAnnotator/src/main/java/pl/waw/ipipan/zil/summarizer/extrsumannotator/main/MyTabChangeListener.java
ExtrSumAnnotator/src/main/java/log4j.properties renamed to ExtrSumAnnotator/src/main/resources/log4j.properties
... | ... | @@ -2,4 +2,4 @@ log4j.appender.stderr=org.apache.log4j.ConsoleAppender |
2 | 2 | log4j.appender.stderr.layout=org.apache.log4j.PatternLayout |
3 | 3 | log4j.appender.stderr.layout.ConversionPattern=[%p] [%C{1}] %m%n |
4 | 4 | |
5 | -log4j.logger.pl.waw.ipipan.zil.summarization.extrsumannotator=INFO, stderr | |
6 | 5 | \ No newline at end of file |
6 | +log4j.logger.pl.waw.ipipan.zil=INFO, stderr | |
7 | 7 | \ No newline at end of file |
... | ... |