You can subscribe to this list here.
| 2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
(33) |
Nov
(96) |
Dec
(173) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2006 |
Jan
(45) |
Feb
(46) |
Mar
(58) |
Apr
(83) |
May
(11) |
Jun
(62) |
Jul
(79) |
Aug
(62) |
Sep
(42) |
Oct
(105) |
Nov
(57) |
Dec
(73) |
| 2007 |
Jan
(187) |
Feb
(60) |
Mar
(313) |
Apr
(174) |
May
(74) |
Jun
(99) |
Jul
(132) |
Aug
(62) |
Sep
(65) |
Oct
(83) |
Nov
(63) |
Dec
(41) |
| 2008 |
Jan
(83) |
Feb
(82) |
Mar
(42) |
Apr
(88) |
May
(68) |
Jun
(67) |
Jul
(37) |
Aug
(69) |
Sep
(52) |
Oct
(85) |
Nov
(65) |
Dec
(49) |
| 2009 |
Jan
(50) |
Feb
(70) |
Mar
(95) |
Apr
(69) |
May
(122) |
Jun
(44) |
Jul
(217) |
Aug
(397) |
Sep
(307) |
Oct
(302) |
Nov
(131) |
Dec
(104) |
| 2010 |
Jan
(87) |
Feb
(102) |
Mar
(105) |
Apr
(141) |
May
(110) |
Jun
(85) |
Jul
(80) |
Aug
(110) |
Sep
(56) |
Oct
(63) |
Nov
(65) |
Dec
(45) |
| 2011 |
Jan
(58) |
Feb
(93) |
Mar
(86) |
Apr
(177) |
May
(82) |
Jun
(182) |
Jul
(91) |
Aug
(72) |
Sep
(70) |
Oct
(124) |
Nov
(154) |
Dec
(251) |
| 2012 |
Jan
(414) |
Feb
(211) |
Mar
(153) |
Apr
(69) |
May
(139) |
Jun
(50) |
Jul
(80) |
Aug
(48) |
Sep
(61) |
Oct
(101) |
Nov
(192) |
Dec
(52) |
| 2013 |
Jan
(48) |
Feb
(47) |
Mar
(75) |
Apr
(43) |
May
(32) |
Jun
(14) |
Jul
(39) |
Aug
(80) |
Sep
(128) |
Oct
(77) |
Nov
(105) |
Dec
(61) |
| 2014 |
Jan
(61) |
Feb
(224) |
Mar
(265) |
Apr
(154) |
May
(130) |
Jun
(88) |
Jul
(98) |
Aug
(57) |
Sep
(81) |
Oct
(58) |
Nov
(57) |
Dec
(34) |
| 2015 |
Jan
(38) |
Feb
(37) |
Mar
(26) |
Apr
(43) |
May
(73) |
Jun
(76) |
Jul
(38) |
Aug
(44) |
Sep
(39) |
Oct
(51) |
Nov
(36) |
Dec
(41) |
| 2016 |
Jan
(35) |
Feb
(51) |
Mar
(16) |
Apr
(106) |
May
(121) |
Jun
(58) |
Jul
(40) |
Aug
(71) |
Sep
(53) |
Oct
(100) |
Nov
(127) |
Dec
(66) |
| 2017 |
Jan
(130) |
Feb
(48) |
Mar
(1) |
Apr
(8) |
May
(16) |
Jun
(19) |
Jul
(12) |
Aug
(4) |
Sep
(2) |
Oct
(2) |
Nov
(4) |
Dec
(3) |
| 2018 |
Jan
|
Feb
(1) |
Mar
(1) |
Apr
(2) |
May
(3) |
Jun
(3) |
Jul
|
Aug
(1) |
Sep
|
Oct
(1) |
Nov
(2) |
Dec
(1) |
| 2019 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2022 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(4) |
| 2023 |
Jan
|
Feb
(2) |
Mar
(1) |
Apr
(2) |
May
(3) |
Jun
|
Jul
|
Aug
(2) |
Sep
|
Oct
(2) |
Nov
(1) |
Dec
|
| 2024 |
Jan
(1) |
Feb
(4) |
Mar
|
Apr
|
May
|
Jun
|
Jul
(2) |
Aug
(4) |
Sep
|
Oct
(4) |
Nov
(1) |
Dec
(1) |
| 2025 |
Jan
(2) |
Feb
|
Mar
(3) |
Apr
|
May
|
Jun
(49) |
Jul
(25) |
Aug
|
Sep
|
Oct
|
Nov
(2) |
Dec
|
| 2026 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
|
1
(1) |
2
(3) |
3
(1) |
4
(1) |
5
(1) |
6
(6) |
7
(5) |
|
8
(8) |
9
(7) |
10
(8) |
11
(1) |
12
(6) |
13
(5) |
14
(2) |
|
15
(2) |
16
(3) |
17
(2) |
18
(1) |
19
(3) |
20
(1) |
21
(1) |
|
22
(1) |
23
(7) |
24
(18) |
25
(7) |
26
(7) |
27
(12) |
28
(4) |
|
29
(3) |
30
(1) |
|
|
|
|
|
|
From: <gat...@us...> - 2013-09-30 01:20:30
|
Revision: 16963
http://sourceforge.net/p/gate/code/16963
Author: gate-project
Date: 2013-09-30 01:20:25 +0000 (Mon, 30 Sep 2013)
Log Message:
-----------
Build number update (build 4676)
Modified Paths:
--------------
gate/trunk/build/build.properties
gate/trunk/build/build.txt
Modified: gate/trunk/build/build.properties
===================================================================
--- gate/trunk/build/build.properties 2013-09-29 16:41:19 UTC (rev 16962)
+++ gate/trunk/build/build.properties 2013-09-30 01:20:25 UTC (rev 16963)
@@ -1,4 +1,4 @@
#Build Number for ANT. Do not edit!
-#Sun Sep 29 02:10:14 BST 2013
+#Mon Sep 30 02:09:23 BST 2013
cvs.version=$Id\: build.properties 7542 2006-07-17 14\:26\:51Z ian_roberts $
-build.number=4676
+build.number=4677
Modified: gate/trunk/build/build.txt
===================================================================
--- gate/trunk/build/build.txt 2013-09-29 16:41:19 UTC (rev 16962)
+++ gate/trunk/build/build.txt 2013-09-30 01:20:25 UTC (rev 16963)
@@ -1 +1 @@
-4675
\ No newline at end of file
+4676
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mar...@us...> - 2013-09-29 16:41:22
|
Revision: 16962
http://sourceforge.net/p/gate/code/16962
Author: markagreenwood
Date: 2013-09-29 16:41:19 +0000 (Sun, 29 Sep 2013)
Log Message:
-----------
added a missing comma and fixed the copyright date to include this year
Modified Paths:
--------------
userguide/trunk/tao_main.tex
Modified: userguide/trunk/tao_main.tex
===================================================================
--- userguide/trunk/tao_main.tex 2013-09-29 15:09:29 UTC (rev 16961)
+++ userguide/trunk/tao_main.tex 2013-09-29 16:41:19 UTC (rev 16962)
@@ -467,7 +467,7 @@
\textit{et al} \\
\hspace*{1cm}
\mbox{ } \\
-\hspace*{0.75cm} \copyright The University of Sheffield, Department of Computer Science 2001-2012 \\
+\hspace*{0.75cm} \copyright The University of Sheffield, Department of Computer Science 2001-2013 \\
\mbox{ } \\
\hspace*{0.75cm} \htlink{http://gate.ac.uk/}{\tt http://gate.ac.uk/} \\
\vspace*{0.2in}
@@ -514,7 +514,7 @@
and several EU-funded projects:
(\htlink{http://www.trendminer-project.eu/}{TrendMiner},
\htlink{http://www.ucomp.eu/}{uComp},
-\htlink{http://www.arcomem.eu/}{Arcomem}
+\htlink{http://www.arcomem.eu/}{Arcomem},
\htlink{http://www.sekt-project.com}{SEKT},
\htlink{http://www.tao-project.eu}{TAO},
\htlink{http://www.neon-project.org}{NeOn},
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mar...@us...> - 2013-09-29 15:09:31
|
Revision: 16961
http://sourceforge.net/p/gate/code/16961
Author: markagreenwood
Date: 2013-09-29 15:09:29 +0000 (Sun, 29 Sep 2013)
Log Message:
-----------
updated the project and company links on the front page
Modified Paths:
--------------
userguide/trunk/tao_main.tex
Modified: userguide/trunk/tao_main.tex
===================================================================
--- userguide/trunk/tao_main.tex 2013-09-29 01:20:38 UTC (rev 16960)
+++ userguide/trunk/tao_main.tex 2013-09-29 15:09:29 UTC (rev 16961)
@@ -507,16 +507,20 @@
Work on GATE has been partly supported by EPSRC grants GR/K25267
(Large-Scale Information Extraction), GR/M31699 (GATE 2), RA007940 (EMILLE),
GR/N15764/01 (AKT) and GR/R85150/01 (MIAKT), AHRB grant APN16396
-(ETCSL/GATE),
-\htlink{http://www.matrixware.com/}{Matrixware},
-the \htlink{http://www.ir-facility.org/}{Information Retrieval Facility}
+(ETCSL/GATE),
+\htlink{http://www.ontotext.com/}{Ontotext}
+Matrixware,
+the Information Retrieval Facility
and several EU-funded projects:
-(\htlink{http://www.sekt-project.com}{SEKT},
+(\htlink{http://www.trendminer-project.eu/}{TrendMiner},
+\htlink{http://www.ucomp.eu/}{uComp},
+\htlink{http://www.arcomem.eu/}{Arcomem}
+\htlink{http://www.sekt-project.com}{SEKT},
\htlink{http://www.tao-project.eu}{TAO},
\htlink{http://www.neon-project.org}{NeOn},
\htlink{http://www.media-campaign.eu}{MediaCampaign},
\htlink{http://cordis.europa.eu/ist/kct/musing_synopsis.htm}{Musing},
-\htlink{http://knowledgeweb.semanticweb.org}{KnowledgeWeb},
+\htlink{http://gate.ac.uk/projects/knowledge-web/}{KnowledgeWeb},
\htlink{http://www.prestospace.org}{PrestoSpace},
\htlink{http://gate.ac.uk/projects/htechsight/}{h-TechSight},
and enIRaF).
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gat...@us...> - 2013-09-29 01:20:41
|
Revision: 16960
http://sourceforge.net/p/gate/code/16960
Author: gate-project
Date: 2013-09-29 01:20:38 +0000 (Sun, 29 Sep 2013)
Log Message:
-----------
Build number update (build 4675)
Modified Paths:
--------------
gate/trunk/build/build.properties
gate/trunk/build/build.txt
Modified: gate/trunk/build/build.properties
===================================================================
--- gate/trunk/build/build.properties 2013-09-28 11:57:47 UTC (rev 16959)
+++ gate/trunk/build/build.properties 2013-09-29 01:20:38 UTC (rev 16960)
@@ -1,4 +1,4 @@
#Build Number for ANT. Do not edit!
-#Sat Sep 28 02:10:17 BST 2013
+#Sun Sep 29 02:10:14 BST 2013
cvs.version=$Id\: build.properties 7542 2006-07-17 14\:26\:51Z ian_roberts $
-build.number=4675
+build.number=4676
Modified: gate/trunk/build/build.txt
===================================================================
--- gate/trunk/build/build.txt 2013-09-28 11:57:47 UTC (rev 16959)
+++ gate/trunk/build/build.txt 2013-09-29 01:20:38 UTC (rev 16960)
@@ -1 +1 @@
-4674
\ No newline at end of file
+4675
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <joh...@us...> - 2013-09-28 11:57:50
|
Revision: 16959
http://sourceforge.net/p/gate/code/16959
Author: johann_p
Date: 2013-09-28 11:57:47 +0000 (Sat, 28 Sep 2013)
Log Message:
-----------
Add methods to set bindings from ONodeID and Literal
Modified Paths:
--------------
gate/trunk/src/gate/creole/ontology/OntologyBooleanQuery.java
Modified: gate/trunk/src/gate/creole/ontology/OntologyBooleanQuery.java
===================================================================
--- gate/trunk/src/gate/creole/ontology/OntologyBooleanQuery.java 2013-09-28 11:49:04 UTC (rev 16958)
+++ gate/trunk/src/gate/creole/ontology/OntologyBooleanQuery.java 2013-09-28 11:57:47 UTC (rev 16959)
@@ -28,7 +28,7 @@
/**
* Re-assign a query variable to a new value. This will let you
* query the triple store with the same query but a different value
- * for the variable. Depending on the implemenation, this might avoid
+ * for the variable. Depending on the implementation, this might avoid
* the necessity to recompile the whole query.
*
* @param varName - the name of the variable to be reassigned
@@ -38,6 +38,28 @@
*/
public void setBinding(String varName, LiteralOrONodeID value);
/**
+ * Re-assign a query variable to a new value. This will let you
+ * query the triple store with the same query but a different value
+ * for the variable. Depending on the implementation, this might avoid
+ * the necessity to recompile the whole query.
+ *
+ * @param varName - the name of the variable to be reassigned
+ * @param value - a ONodeID object (usually a OURI object)
+ *
+ */
+ public void setBinding(String varName, ONodeID value);
+ /**
+ * Re-assign a query variable to a new value. This will let you
+ * query the triple store with the same query but a different value
+ * for the variable. Depending on the implementation, this might avoid
+ * the necessity to recompile the whole query.
+ *
+ * @param varName - the name of the variable to be reassigned
+ * @param value - a Literal object
+ *
+ */
+ public void setBinding(String varName, Literal value);
+ /**
* Evaluate the boolean query and return whether it evaluates to true
* or false;
*
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <joh...@us...> - 2013-09-28 11:49:07
|
Revision: 16958
http://sourceforge.net/p/gate/code/16958
Author: johann_p
Date: 2013-09-28 11:49:04 +0000 (Sat, 28 Sep 2013)
Log Message:
-----------
Add methods to set bindings from ONodeID and Literal
Modified Paths:
--------------
gate/trunk/plugins/Ontology/src/gate/creole/ontology/impl/sesame/UtilBooleanQuery.java
Modified: gate/trunk/plugins/Ontology/src/gate/creole/ontology/impl/sesame/UtilBooleanQuery.java
===================================================================
--- gate/trunk/plugins/Ontology/src/gate/creole/ontology/impl/sesame/UtilBooleanQuery.java 2013-09-28 11:48:39 UTC (rev 16957)
+++ gate/trunk/plugins/Ontology/src/gate/creole/ontology/impl/sesame/UtilBooleanQuery.java 2013-09-28 11:49:04 UTC (rev 16958)
@@ -14,9 +14,11 @@
package gate.creole.ontology.impl.sesame;
import gate.creole.ontology.GateOntologyException;
+import gate.creole.ontology.Literal;
import gate.creole.ontology.LiteralOrONodeID;
import gate.creole.ontology.OntologyBooleanQuery;
import gate.creole.ontology.OConstants;
+import gate.creole.ontology.ONodeID;
import org.apache.log4j.Logger;
import org.openrdf.model.Value;
import org.openrdf.query.QueryLanguage;
@@ -109,5 +111,13 @@
return ret;
}
+ public void setBinding(String string, ONodeID onid) {
+ mBooleanQuery.setBinding(string, mSesameManager.toSesameResource(onid));
}
+ public void setBinding(String string, Literal ltrl) {
+ mBooleanQuery.setBinding(string, mSesameManager.toSesameLiteral(ltrl));
+ }
+
+ }
+
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <joh...@us...> - 2013-09-28 11:48:43
|
Revision: 16957
http://sourceforge.net/p/gate/code/16957
Author: johann_p
Date: 2013-09-28 11:48:39 +0000 (Sat, 28 Sep 2013)
Log Message:
-----------
use correct adapter method
Modified Paths:
--------------
gate/trunk/plugins/Ontology/src/gate/creole/ontology/impl/sesame/UtilTupleQueryIterator.java
Modified: gate/trunk/plugins/Ontology/src/gate/creole/ontology/impl/sesame/UtilTupleQueryIterator.java
===================================================================
--- gate/trunk/plugins/Ontology/src/gate/creole/ontology/impl/sesame/UtilTupleQueryIterator.java 2013-09-28 01:20:55 UTC (rev 16956)
+++ gate/trunk/plugins/Ontology/src/gate/creole/ontology/impl/sesame/UtilTupleQueryIterator.java 2013-09-28 11:48:39 UTC (rev 16957)
@@ -121,7 +121,7 @@
mTupleQuery.setBinding(name, mSesameManager.toSesameLiteral(value));
}
public void setBinding(String name, ONodeID value) {
- mTupleQuery.setBinding(name, mSesameManager.toSesameValue(value));
+ mTupleQuery.setBinding(name, mSesameManager.toSesameResource(value));
}
/**
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gat...@us...> - 2013-09-28 01:20:59
|
Revision: 16956
http://sourceforge.net/p/gate/code/16956
Author: gate-project
Date: 2013-09-28 01:20:55 +0000 (Sat, 28 Sep 2013)
Log Message:
-----------
Build number update (build 4674)
Modified Paths:
--------------
gate/trunk/build/build.properties
gate/trunk/build/build.txt
Modified: gate/trunk/build/build.properties
===================================================================
--- gate/trunk/build/build.properties 2013-09-27 19:26:31 UTC (rev 16955)
+++ gate/trunk/build/build.properties 2013-09-28 01:20:55 UTC (rev 16956)
@@ -1,4 +1,4 @@
#Build Number for ANT. Do not edit!
-#Fri Sep 27 02:12:07 BST 2013
+#Sat Sep 28 02:10:17 BST 2013
cvs.version=$Id\: build.properties 7542 2006-07-17 14\:26\:51Z ian_roberts $
-build.number=4674
+build.number=4675
Modified: gate/trunk/build/build.txt
===================================================================
--- gate/trunk/build/build.txt 2013-09-27 19:26:31 UTC (rev 16955)
+++ gate/trunk/build/build.txt 2013-09-28 01:20:55 UTC (rev 16956)
@@ -1 +1 @@
-4673
\ No newline at end of file
+4674
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gat...@us...> - 2013-09-27 19:26:33
|
Revision: 16955
http://sourceforge.net/p/gate/code/16955
Author: gate-project
Date: 2013-09-27 19:26:31 +0000 (Fri, 27 Sep 2013)
Log Message:
-----------
[kalina] Edited with GATEWiki
Modified Paths:
--------------
gate/trunk/doc/papers.html
gate/trunk/doc/papers.yam
Modified: gate/trunk/doc/papers.html
===================================================================
--- gate/trunk/doc/papers.html 2013-09-27 19:25:46 UTC (rev 16954)
+++ gate/trunk/doc/papers.html 2013-09-27 19:26:31 UTC (rev 16955)
@@ -52,7 +52,7 @@
<li>H. Cunningham, et al. Text Processing with GATE (Version 6). University of Sheffield Department of Computer Science. 15 April 2011. ISBN 0956599311. <a class="cow-url" href="http://tinyurl.com/gatebook">Available from Amazon</a>. <a class="cow-url" href="bibtex.html#Cunningham2011a">BibTex</a>.</li>
</ul>
-<h3 class="cow-heading">I Used ANNIE:</h3>
+<h3 class="cow-heading">I Used ANNIE (for TwitIE (ANNIE for social media see below):</h3>
<ul>
<li>H. Cunningham, D. Maynard, K. Bontcheva, V. Tablan. GATE: A Framework and Graphical Development Environment for Robust NLP Tools and Applications. Proceedings of the 40th Anniversary Meeting of the Association for Computational Linguistics (ACL'02). Philadelphia, July 2002. <a class="cow-url" href="../../sale/acl02/acl-main.pdf">PDF</a>. <a class="cow-url" href="bibtex.html#Cunningham2002">BibTeX</a>.</li>
Modified: gate/trunk/doc/papers.yam
===================================================================
--- gate/trunk/doc/papers.yam 2013-09-27 19:25:46 UTC (rev 16954)
+++ gate/trunk/doc/papers.yam 2013-09-27 19:26:31 UTC (rev 16955)
@@ -8,7 +8,7 @@
- H. Cunningham, et al. Text Processing with GATE (Version 6). University of Sheffield Department of Computer Science. 15 April 2011. ISBN 0956599311. %(http://tinyurl.com/gatebook, Available from Amazon). %(bibtex.html#Cunningham2011a, BibTex).
-%3* I Used ANNIE:
+%3* I Used ANNIE (for TwitIE (ANNIE for social media see below):
- H. Cunningham, D. Maynard, K. Bontcheva, V. Tablan. GATE: A Framework and Graphical Development Environment for Robust NLP Tools and Applications. Proceedings of the 40th Anniversary Meeting of the Association for Computational Linguistics (ACL'02). Philadelphia, July 2002. %(../../sale/acl02/acl-main.pdf,PDF). %(bibtex.html#Cunningham2002, BibTeX).
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gat...@us...> - 2013-09-27 19:25:49
|
Revision: 16954
http://sourceforge.net/p/gate/code/16954
Author: gate-project
Date: 2013-09-27 19:25:46 +0000 (Fri, 27 Sep 2013)
Log Message:
-----------
[kalina] Edited with GATEWiki
Modified Paths:
--------------
gate/trunk/doc/papers.html
gate/trunk/doc/papers.yam
Modified: gate/trunk/doc/papers.html
===================================================================
--- gate/trunk/doc/papers.html 2013-09-27 17:55:19 UTC (rev 16953)
+++ gate/trunk/doc/papers.html 2013-09-27 19:25:46 UTC (rev 16954)
@@ -72,6 +72,11 @@
<ul>
<li>K. Bontcheva, H. Cunningham, I. Roberts, A. Roberts, V. Tablan, N. Aswani, G. Gorrell. Teamware: A Web-based, Collaborative Text Annotation Framework. Language Resources and Evaluation. In Press. <a class="cow-url" href="http://link.springer.com/article/10.1007/s10579-013-9215-6">PDF</a></li>
</ul>
+<h3 class="cow-heading">I used TwitIE / the social media components in GATE:</h3>
+
+ <ul>
+ <li>K. Bontcheva, L. Derczynski, A. Funk, M.A. Greenwood, D. Maynard, N. Aswani. TwitIE: An Open-Source Information Extraction Pipeline for Microblog Text. Proceedings of the International Conference on Recent Advances in Natural Language Processing (RANLP 2013). <a class="cow-url" href="https://gate.ac.uk/sale/ranlp2013/twitie/twitie-ranlp2013.pdf">PDF</a>, <a class="cow-url" href="https://gate.ac.uk/wiki/twitie.html">Download TwitIE</a></li>
+ </ul>
<h3 class="cow-heading">I used the machine learning facilities in GATE:</h3>
<ul>
@@ -92,11 +97,7 @@
<ul>
<li>M. Dowman, V. Tablan, H. Cunningham and B. Popov. Web-Assisted Annotation, Semantic Indexing and Search of Television and Radio News. 14th International World Wide Web Conference. Chiba, Japan, 2005. <a class="cow-url" href="http://gate.ac.uk/sale/www05/web-assisted-annotation.pdf">PDF</a>. <a class="cow-url" href="bibtex.html#Dowman2005">BibTeX</a>.</li>
</ul>
-<h3 class="cow-heading">I used TwitIE / the social media facilities in GATE:</h3>
- <ul>
- <li>K. Bontcheva, L. Derczynski, A. Funk, M.A. Greenwood, D. Maynard, N. Aswani. TwitIE: An Open-Source Information Extraction Pipeline for Microblog Text. Proceedings of the International Conference on Recent Advances in Natural Language Processing (RANLP 2013). <a class="cow-url" href="https://gate.ac.uk/sale/ranlp2013/twitie/twitie-ranlp2013.pdf">PDF</a>, <a class="cow-url" href="https://gate.ac.uk/wiki/twitie.html">Download TwitIE</a></li>
- </ul>
<div class="cow-contents"><h2 class="cow-heading">Contents</h2>
<p><ul>
Modified: gate/trunk/doc/papers.yam
===================================================================
--- gate/trunk/doc/papers.yam 2013-09-27 17:55:19 UTC (rev 16953)
+++ gate/trunk/doc/papers.yam 2013-09-27 19:25:46 UTC (rev 16954)
@@ -24,6 +24,10 @@
- K. Bontcheva, H. Cunningham, I. Roberts, A. Roberts, V. Tablan, N. Aswani, G. Gorrell. Teamware: A Web-based, Collaborative Text Annotation Framework. Language Resources and Evaluation. In Press. %(http://link.springer.com/article/10.1007/s10579-013-9215-6,PDF)
+%3* I used TwitIE / the social media components in GATE:
+
+ - K. Bontcheva, L. Derczynski, A. Funk, M.A. Greenwood, D. Maynard, N. Aswani. TwitIE: An Open-Source Information Extraction Pipeline for Microblog Text. Proceedings of the International Conference on Recent Advances in Natural Language Processing (RANLP 2013). %(https://gate.ac.uk/sale/ranlp2013/twitie/twitie-ranlp2013.pdf, PDF), %(https://gate.ac.uk/wiki/twitie.html, Download TwitIE)
+
%3* I used the machine learning facilities in GATE:
- Y. Li, K. Bontcheva and H. Cunningham. Adapting SVM for Data Sparseness and Imbalance: A Case Study on Information Extraction. Natural Language Engineering, 15(02), 241-271, 2009. %(http://journals.cambridge.org/repo_A45LfkBD,On-line Link). %(../../sale/nle-svm/svm-ie-nle-revision.pdf,Pre-print), %(bibtex.html#Li2009, BibTeX).
@@ -40,10 +44,7 @@
- M. Dowman, V. Tablan, H. Cunningham and B. Popov. Web-Assisted Annotation, Semantic Indexing and Search of Television and Radio News. 14th International World Wide Web Conference. Chiba, Japan, 2005. %(http://gate.ac.uk/sale/www05/web-assisted-annotation.pdf,PDF). %(bibtex.html#Dowman2005, BibTeX).
-%3* I used TwitIE / the social media facilities in GATE:
- - K. Bontcheva, L. Derczynski, A. Funk, M.A. Greenwood, D. Maynard, N. Aswani. TwitIE: An Open-Source Information Extraction Pipeline for Microblog Text. Proceedings of the International Conference on Recent Advances in Natural Language Processing (RANLP 2013). %(https://gate.ac.uk/sale/ranlp2013/twitie/twitie-ranlp2013.pdf, PDF), %(https://gate.ac.uk/wiki/twitie.html, Download TwitIE)
-
%contents
%1 Book Chapters, Journals and Conference papers
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ada...@us...> - 2013-09-27 17:55:21
|
Revision: 16953
http://sourceforge.net/p/gate/code/16953
Author: adamfunk
Date: 2013-09-27 17:55:19 +0000 (Fri, 27 Sep 2013)
Log Message:
-----------
Removed some debugging code.
Modified Paths:
--------------
gate/trunk/plugins/Twitter/src/gate/corpora/twitter/PopulationDialogWrapper.java
Modified: gate/trunk/plugins/Twitter/src/gate/corpora/twitter/PopulationDialogWrapper.java
===================================================================
--- gate/trunk/plugins/Twitter/src/gate/corpora/twitter/PopulationDialogWrapper.java 2013-09-27 17:54:44 UTC (rev 16952)
+++ gate/trunk/plugins/Twitter/src/gate/corpora/twitter/PopulationDialogWrapper.java 2013-09-27 17:55:19 UTC (rev 16953)
@@ -94,7 +94,6 @@
configPersistenceBox.add(saveConfigButton);
configPersistenceBox.add(Box.createHorizontalGlue());
- // TODO keep these commented out on svn until reloading works properly
dialog.add(configPersistenceBox);
dialog.add(Box.createVerticalStrut(5));
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ada...@us...> - 2013-09-27 17:54:47
|
Revision: 16952
http://sourceforge.net/p/gate/code/16952
Author: adamfunk
Date: 2013-09-27 17:54:44 +0000 (Fri, 27 Sep 2013)
Log Message:
-----------
Removed some debugging code.
Modified Paths:
--------------
gate/trunk/plugins/Twitter/src/gate/corpora/twitter/PopulationConfig.java
Modified: gate/trunk/plugins/Twitter/src/gate/corpora/twitter/PopulationConfig.java
===================================================================
--- gate/trunk/plugins/Twitter/src/gate/corpora/twitter/PopulationConfig.java 2013-09-27 17:52:24 UTC (rev 16951)
+++ gate/trunk/plugins/Twitter/src/gate/corpora/twitter/PopulationConfig.java 2013-09-27 17:54:44 UTC (rev 16952)
@@ -147,8 +147,6 @@
chooser.setFileSelectionMode(JFileChooser.FILES_ONLY);
int chosen = chooser.showOpenDialog(this.wrapper.dialog);
if (chosen == JFileChooser.APPROVE_OPTION) {
- File file = chooser.getSelectedFile();
- System.out.println("Loading " + file.getAbsolutePath());
wrapper.setNewConfig(PopulationConfig.load(chooser.getSelectedFile()));
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ada...@us...> - 2013-09-27 17:52:27
|
Revision: 16951
http://sourceforge.net/p/gate/code/16951
Author: adamfunk
Date: 2013-09-27 17:52:24 +0000 (Fri, 27 Sep 2013)
Log Message:
-----------
Finally the load/save config options work.
GUI still needs a little tidying.
Modified Paths:
--------------
gate/trunk/plugins/Twitter/src/gate/corpora/twitter/Population.java
gate/trunk/plugins/Twitter/src/gate/corpora/twitter/PopulationConfig.java
gate/trunk/plugins/Twitter/src/gate/corpora/twitter/PopulationDialogWrapper.java
Modified: gate/trunk/plugins/Twitter/src/gate/corpora/twitter/Population.java
===================================================================
--- gate/trunk/plugins/Twitter/src/gate/corpora/twitter/Population.java 2013-09-27 13:20:34 UTC (rev 16950)
+++ gate/trunk/plugins/Twitter/src/gate/corpora/twitter/Population.java 2013-09-27 17:52:24 UTC (rev 16951)
@@ -32,7 +32,6 @@
public class Population extends ResourceHelper {
private static final long serialVersionUID = 1443073039199794668L;
-
public static void populateCorpus(final Corpus corpus, URL inputUrl, PopulationConfig config)
@@ -68,20 +67,20 @@
int tweetCounter = 0;
Document document = newDocument(inputUrl, tweetCounter, digits);
StringBuilder content = new StringBuilder();
- Map<PreAnnotation, Integer> annotanda = new HashMap<PreAnnotation, Integer>();
+ Map<PreAnnotation, Integer> annotandaOffsets = new HashMap<PreAnnotation, Integer>();
for (Tweet tweet : tweets) {
if ( (tweetsPerDoc > 0) && (tweetCounter > 0) && ((tweetCounter % tweetsPerDoc) == 0) ) {
- closeDocument(document, content, annotanda, corpus);
+ closeDocument(document, content, annotandaOffsets, corpus);
document = newDocument(inputUrl, tweetCounter, digits);
content = new StringBuilder();
- annotanda = new HashMap<PreAnnotation, Integer>();
+ annotandaOffsets = new HashMap<PreAnnotation, Integer>();
}
int startOffset = content.length();
content.append(tweet.getString());
for (PreAnnotation preAnn : tweet.getAnnotations()) {
- annotanda.put(preAnn, startOffset);
+ annotandaOffsets.put(preAnn, startOffset);
}
content.append('\n');
@@ -89,7 +88,7 @@
} // end of Tweet loop
if (content.length() > 0) {
- closeDocument(document, content, annotanda, corpus);
+ closeDocument(document, content, annotandaOffsets, corpus);
}
else {
Factory.deleteResource(document);
@@ -118,12 +117,12 @@
}
- private static void closeDocument(Document document, StringBuilder content, Map<PreAnnotation, Integer> annotanda, Corpus corpus) throws InvalidOffsetException {
+ private static void closeDocument(Document document, StringBuilder content, Map<PreAnnotation, Integer> annotandaOffsets, Corpus corpus) throws InvalidOffsetException {
DocumentContent contentImpl = new DocumentContentImpl(content.toString());
document.setContent(contentImpl);
AnnotationSet originalMarkups = document.getAnnotations(Gate.ORIGINAL_MARKUPS_ANNOT_SET_NAME);
- for (PreAnnotation preAnn : annotanda.keySet()) {
- preAnn.toAnnotation(originalMarkups, annotanda.get(preAnn));
+ for (PreAnnotation preAnn : annotandaOffsets.keySet()) {
+ preAnn.toAnnotation(originalMarkups, annotandaOffsets.get(preAnn));
}
corpus.add(document);
Modified: gate/trunk/plugins/Twitter/src/gate/corpora/twitter/PopulationConfig.java
===================================================================
--- gate/trunk/plugins/Twitter/src/gate/corpora/twitter/PopulationConfig.java 2013-09-27 13:20:34 UTC (rev 16950)
+++ gate/trunk/plugins/Twitter/src/gate/corpora/twitter/PopulationConfig.java 2013-09-27 17:52:24 UTC (rev 16951)
@@ -147,8 +147,9 @@
chooser.setFileSelectionMode(JFileChooser.FILES_ONLY);
int chosen = chooser.showOpenDialog(this.wrapper.dialog);
if (chosen == JFileChooser.APPROVE_OPTION) {
- wrapper.config = PopulationConfig.load(chooser.getSelectedFile());
- wrapper.updateGui();
+ File file = chooser.getSelectedFile();
+ System.out.println("Loading " + file.getAbsolutePath());
+ wrapper.setNewConfig(PopulationConfig.load(chooser.getSelectedFile()));
}
}
}
@@ -169,6 +170,7 @@
int chosen = chooser.showSaveDialog(this.wrapper.dialog);
if (chosen == JFileChooser.APPROVE_OPTION) {
try {
+ wrapper.updateConfig();
wrapper.config.saveXML(chooser.getSelectedFile());
}
catch(IOException e1) {
Modified: gate/trunk/plugins/Twitter/src/gate/corpora/twitter/PopulationDialogWrapper.java
===================================================================
--- gate/trunk/plugins/Twitter/src/gate/corpora/twitter/PopulationDialogWrapper.java 2013-09-27 13:20:34 UTC (rev 16950)
+++ gate/trunk/plugins/Twitter/src/gate/corpora/twitter/PopulationDialogWrapper.java 2013-09-27 17:52:24 UTC (rev 16951)
@@ -95,8 +95,8 @@
configPersistenceBox.add(Box.createHorizontalGlue());
// TODO keep these commented out on svn until reloading works properly
- //dialog.add(configPersistenceBox);
- //dialog.add(Box.createVerticalStrut(5));
+ dialog.add(configPersistenceBox);
+ dialog.add(Box.createVerticalStrut(5));
dialog.add(new JSeparator(SwingConstants.HORIZONTAL));
dialog.add(Box.createVerticalStrut(2));
@@ -141,6 +141,11 @@
}
+ protected void setNewConfig(PopulationConfig newConfig) {
+ this.config = newConfig;
+ this.updateGui();
+ }
+
protected void updateConfig() {
this.config.setTweetsPerDoc(this.checkbox.isSelected() ? 1 : 0);
this.config.setContentKeys(this.contentKeysEditor.getValues());
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ada...@us...> - 2013-09-27 13:20:37
|
Revision: 16950
http://sourceforge.net/p/gate/code/16950
Author: adamfunk
Date: 2013-09-27 13:20:34 +0000 (Fri, 27 Sep 2013)
Log Message:
-----------
Shifting some code around for clarity.
Reloading not working yet.
Modified Paths:
--------------
gate/trunk/plugins/Twitter/src/gate/corpora/twitter/Population.java
gate/trunk/plugins/Twitter/src/gate/corpora/twitter/PopulationConfig.java
Added Paths:
-----------
gate/trunk/plugins/Twitter/src/gate/corpora/twitter/PopulationDialogWrapper.java
Modified: gate/trunk/plugins/Twitter/src/gate/corpora/twitter/Population.java
===================================================================
--- gate/trunk/plugins/Twitter/src/gate/corpora/twitter/Population.java 2013-09-27 12:53:53 UTC (rev 16949)
+++ gate/trunk/plugins/Twitter/src/gate/corpora/twitter/Population.java 2013-09-27 13:20:34 UTC (rev 16950)
@@ -18,29 +18,12 @@
import gate.creole.metadata.CreoleResource;
import gate.gui.*;
import gate.util.*;
-
-import java.awt.Window;
import java.awt.event.ActionEvent;
-import java.awt.event.ActionListener;
import java.io.*;
import java.net.*;
import java.util.*;
-
import javax.swing.AbstractAction;
import javax.swing.Action;
-import javax.swing.Box;
-import javax.swing.BoxLayout;
-import javax.swing.JButton;
-import javax.swing.JCheckBox;
-import javax.swing.JDialog;
-import javax.swing.JFileChooser;
-import javax.swing.JLabel;
-import javax.swing.JPanel;
-import javax.swing.JSeparator;
-import javax.swing.JTextField;
-import javax.swing.SwingConstants;
-import javax.swing.SwingUtilities;
-
import org.apache.commons.io.IOUtils;
import org.apache.commons.lang.*;
@@ -200,233 +183,3 @@
}
}
-
-
-class PopulationDialogWrapper {
- protected JDialog dialog;
- private PopulationConfig config;
- private JTextField encodingField;
- private JCheckBox checkbox;
- private JFileChooser chooser;
- private List<URL> fileUrls;
- private ListEditor featureKeysEditor, contentKeysEditor;
-
-
- public PopulationDialogWrapper() {
- config = new PopulationConfig();
-
- dialog = new JDialog(MainFrame.getInstance(), "Populate from Twitter JSON", true);
- MainFrame.getGuiRoots().add(dialog);
- dialog.getContentPane().setLayout(new BoxLayout(dialog.getContentPane(), BoxLayout.Y_AXIS));
- dialog.add(Box.createVerticalStrut(3));
-
- Box encodingBox = Box.createHorizontalBox();
- JLabel encodingLabel = new JLabel("Encoding:");
- encodingField = new JTextField(config.getEncoding());
- encodingBox.add(encodingLabel);
- encodingBox.add(encodingField);
- dialog.add(encodingBox);
- dialog.add(Box.createVerticalStrut(4));
-
- Box checkboxBox = Box.createHorizontalBox();
- checkboxBox.setToolTipText("If unchecked, one document per file");
- JLabel checkboxLabel = new JLabel("One document per tweet");
- checkbox = new JCheckBox();
- checkbox.setSelected(config.getOneDocCheckbox());
- checkboxBox.add(checkboxLabel);
- checkboxBox.add(Box.createHorizontalGlue());
- checkboxBox.add(checkbox);
- dialog.add(checkboxBox);
- dialog.add(Box.createVerticalStrut(4));
-
- contentKeysEditor = new ListEditor("Content keys: ", config.getContentKeys());
- contentKeysEditor.setToolTipText("JSON key paths to be turned into DocumentContent");
- dialog.add(contentKeysEditor);
- dialog.add(Box.createVerticalStrut(4));
-
- featureKeysEditor = new ListEditor("Feature keys: ", config.getFeatureKeys());
- featureKeysEditor.setToolTipText("JSON key paths to be turned into Tweet annotation features");
- dialog.add(featureKeysEditor);
- dialog.add(Box.createVerticalStrut(6));
-
- Box configPersistenceBox = Box.createHorizontalBox();
- configPersistenceBox.add(Box.createHorizontalGlue());
- JButton loadConfigButton = new JButton("Load configuration");
- loadConfigButton.setToolTipText("Replace the configuration above with a previously saved one");
- loadConfigButton.addActionListener(new LoadConfigListener(config, this));
- configPersistenceBox.add(loadConfigButton);
- configPersistenceBox.add(Box.createHorizontalGlue());
- JButton saveConfigButton = new JButton("Save configuration");
- saveConfigButton.setToolTipText("Save the configuration above for re-use");
- saveConfigButton.addActionListener(new SaveConfigListener(config, this));
- configPersistenceBox.add(saveConfigButton);
- configPersistenceBox.add(Box.createHorizontalGlue());
-
- // TODO keep these commented out on svn until reloading works properly
- //dialog.add(configPersistenceBox);
- //dialog.add(Box.createVerticalStrut(5));
-
- dialog.add(new JSeparator(SwingConstants.HORIZONTAL));
- dialog.add(Box.createVerticalStrut(2));
-
- chooser = new JFileChooser();
- chooser.setFileSelectionMode(JFileChooser.FILES_ONLY);
- chooser.setMultiSelectionEnabled(true);
- chooser.setDialogTitle("Select a Twitter JSON file");
- chooser.resetChoosableFileFilters();
- chooser.setAcceptAllFileFilterUsed(false);
- ExtensionFileFilter filter = new ExtensionFileFilter("Twitter JSON files (*.json)", "json");
- chooser.addChoosableFileFilter(filter);
- chooser.setFileFilter(filter);
- chooser.setApproveButtonText("Populate");
- chooser.addActionListener(new PopulationDialogListener(this));
-
- dialog.add(chooser);
- dialog.pack();
- dialog.setLocationRelativeTo(dialog.getOwner());
- dialog.setVisible(true);
- }
-
-
- public String getEncoding() {
- return this.config.getEncoding();
- }
-
- public List<URL> getFileUrls() throws MalformedURLException {
- return this.fileUrls;
- }
-
- public int getTweetsPerDoc() {
- return this.config.getTweetsPerDoc();
- }
-
- public List<String> getContentKeys() {
- return this.config.getContentKeys();
- }
-
- public List<String> getFeatureKeys() {
- return this.config.getFeatureKeys();
- }
-
-
- protected void updateConfig() {
- this.config.setTweetsPerDoc(this.checkbox.isSelected() ? 1 : 0);
- this.config.setContentKeys(this.contentKeysEditor.getValues());
- this.config.setFeatureKeys(this.featureKeysEditor.getValues());
- this.config.setEncoding(this.encodingField.getText());
- }
-
-
- protected void updateGui() {
- this.encodingField.setText(config.getEncoding());
- this.contentKeysEditor.setValues(config.getContentKeys());
- this.featureKeysEditor.setValues(config.getFeatureKeys());
- this.checkbox.setSelected(config.getOneDocCheckbox());
- }
-
-
- protected void loadFile() {
- updateConfig();
-
- try {
- this.fileUrls = new ArrayList<URL>();
- for (File file : this.chooser.getSelectedFiles()) {
- this.fileUrls.add(file.toURI().toURL());
- }
- }
- catch (MalformedURLException e) {
- e.printStackTrace();
- }
- finally {
- this.dialog.dispose();
- }
- }
-
-
- protected void cancel() {
- this.dialog.dispose();
- }
-
-}
-
-
-class PopulationDialogListener implements ActionListener {
-
- private PopulationDialogWrapper dialog;
-
- public PopulationDialogListener(PopulationDialogWrapper dialog) {
- this.dialog = dialog;
- }
-
-
- @Override
- public void actionPerformed(ActionEvent event) {
- if (event.getActionCommand().equals(JFileChooser.APPROVE_SELECTION)){
- this.dialog.loadFile();
- }
- else {
- this.dialog.cancel();
- }
- }
-
-}
-
-
-class ListEditor extends JPanel {
- private static final long serialVersionUID = -1578463259277343578L;
-
- private JButton listButton;
- private ListEditorDialog listEditor;
- private List<String> values;
- private JLabel label;
- private JTextField field;
-
- @Override
- public void setToolTipText(String text) {
- super.setToolTipText(text);
- label.setToolTipText(text);
- field.setToolTipText(text);
- }
-
-
- public ListEditor(String labelString, List<String> initialValues) {
- label = new JLabel(labelString);
- field = new JTextField();
- values = initialValues;
- field.setText(Strings.toString(initialValues));
- field.setEditable(false);
-
- listEditor = new ListEditorDialog(SwingUtilities.getAncestorOfClass(
- Window.class, this), values, List.class, String.class.getName());
-
- listButton = new JButton(MainFrame.getIcon("edit-list"));
- listButton.setToolTipText("Edit the list");
-
- listButton.addActionListener(new ActionListener() {
- @SuppressWarnings("unchecked")
- public void actionPerformed(ActionEvent e) {
- List<?> returnedList = listEditor.showDialog();
- if(returnedList != null) {
- values = (List<String>) returnedList;
- field.setText(Strings.toString(returnedList));
- }
- }
- });
-
- this.setLayout(new BoxLayout(this, BoxLayout.X_AXIS));
- this.add(label);
- this.add(field);
- this.add(listButton);
- }
-
-
- public List<String> getValues() {
- return this.values;
- }
-
- public void setValues(List<String> values) {
- this.values = values;
- this.field.setText(Strings.toString(values));
- }
-
-}
Modified: gate/trunk/plugins/Twitter/src/gate/corpora/twitter/PopulationConfig.java
===================================================================
--- gate/trunk/plugins/Twitter/src/gate/corpora/twitter/PopulationConfig.java 2013-09-27 12:53:53 UTC (rev 16949)
+++ gate/trunk/plugins/Twitter/src/gate/corpora/twitter/PopulationConfig.java 2013-09-27 13:20:34 UTC (rev 16950)
@@ -109,12 +109,14 @@
public static PopulationConfig load(File file) {
XStream xstream = new XStream(new StaxDriver());
+ // setClassLoader needed so XStream finds plugin classes
xstream.setClassLoader(Gate.getClassLoader());
return (PopulationConfig) xstream.fromXML(file);
}
public static PopulationConfig load(URL url) {
XStream xstream = new XStream(new StaxDriver());
+ // setClassLoader needed so XStream finds plugin classes
xstream.setClassLoader(Gate.getClassLoader());
return (PopulationConfig) xstream.fromXML(url);
}
@@ -122,6 +124,7 @@
public void saveXML(File file) throws IOException {
XStream xstream = new XStream(new StaxDriver());
+ //TODO slap an XML prolog on the front
PrettyPrintWriter ppw = new PrettyPrintWriter(new OutputStreamWriter(new FileOutputStream(file), "UTF-8"));
xstream.marshal(this, ppw);
ppw.close();
@@ -131,11 +134,9 @@
class LoadConfigListener implements ActionListener {
- PopulationConfig config;
PopulationDialogWrapper wrapper;
- public LoadConfigListener(PopulationConfig config, PopulationDialogWrapper wrapper) {
- this.config = config;
+ public LoadConfigListener(PopulationDialogWrapper wrapper) {
this.wrapper = wrapper;
}
@@ -146,7 +147,7 @@
chooser.setFileSelectionMode(JFileChooser.FILES_ONLY);
int chosen = chooser.showOpenDialog(this.wrapper.dialog);
if (chosen == JFileChooser.APPROVE_OPTION) {
- config.reload(chooser.getSelectedFile());
+ wrapper.config = PopulationConfig.load(chooser.getSelectedFile());
wrapper.updateGui();
}
}
@@ -154,11 +155,9 @@
class SaveConfigListener implements ActionListener {
- PopulationConfig config;
PopulationDialogWrapper wrapper;
- public SaveConfigListener(PopulationConfig config, PopulationDialogWrapper wrapper) {
- this.config = config;
+ public SaveConfigListener(PopulationDialogWrapper wrapper) {
this.wrapper = wrapper;
}
@@ -170,7 +169,7 @@
int chosen = chooser.showSaveDialog(this.wrapper.dialog);
if (chosen == JFileChooser.APPROVE_OPTION) {
try {
- config.saveXML(chooser.getSelectedFile());
+ wrapper.config.saveXML(chooser.getSelectedFile());
}
catch(IOException e1) {
e1.printStackTrace();
Copied: gate/trunk/plugins/Twitter/src/gate/corpora/twitter/PopulationDialogWrapper.java (from rev 16949, gate/trunk/plugins/Twitter/src/gate/corpora/twitter/Population.java)
===================================================================
--- gate/trunk/plugins/Twitter/src/gate/corpora/twitter/PopulationDialogWrapper.java (rev 0)
+++ gate/trunk/plugins/Twitter/src/gate/corpora/twitter/PopulationDialogWrapper.java 2013-09-27 13:20:34 UTC (rev 16950)
@@ -0,0 +1,264 @@
+/*
+ * Copyright (c) 1995-2013, The University of Sheffield. See the file
+ * COPYRIGHT.txt in the software or at http://gate.ac.uk/gate/COPYRIGHT.txt
+ *
+ * This file is part of GATE (see http://gate.ac.uk/), and is free
+ * software, licenced under the GNU Library General Public License,
+ * Version 2, June 1991 (in the distribution as file licence.html,
+ * and also available at http://gate.ac.uk/gate/licence.html).
+ *
+ * $Id$
+ */
+package gate.corpora.twitter;
+
+import gate.gui.*;
+import gate.util.*;
+import java.awt.Window;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.io.*;
+import java.net.*;
+import java.util.*;
+
+import javax.swing.Box;
+import javax.swing.BoxLayout;
+import javax.swing.JButton;
+import javax.swing.JCheckBox;
+import javax.swing.JDialog;
+import javax.swing.JFileChooser;
+import javax.swing.JLabel;
+import javax.swing.JPanel;
+import javax.swing.JSeparator;
+import javax.swing.JTextField;
+import javax.swing.SwingConstants;
+import javax.swing.SwingUtilities;
+
+
+public class PopulationDialogWrapper {
+ protected JDialog dialog;
+ protected PopulationConfig config;
+ private JTextField encodingField;
+ private JCheckBox checkbox;
+ private JFileChooser chooser;
+ private List<URL> fileUrls;
+ private ListEditor featureKeysEditor, contentKeysEditor;
+
+
+ public PopulationDialogWrapper() {
+ config = new PopulationConfig();
+
+ dialog = new JDialog(MainFrame.getInstance(), "Populate from Twitter JSON", true);
+ MainFrame.getGuiRoots().add(dialog);
+ dialog.getContentPane().setLayout(new BoxLayout(dialog.getContentPane(), BoxLayout.Y_AXIS));
+ dialog.add(Box.createVerticalStrut(3));
+
+ Box encodingBox = Box.createHorizontalBox();
+ JLabel encodingLabel = new JLabel("Encoding:");
+ encodingField = new JTextField(config.getEncoding());
+ encodingBox.add(encodingLabel);
+ encodingBox.add(encodingField);
+ dialog.add(encodingBox);
+ dialog.add(Box.createVerticalStrut(4));
+
+ Box checkboxBox = Box.createHorizontalBox();
+ checkboxBox.setToolTipText("If unchecked, one document per file");
+ JLabel checkboxLabel = new JLabel("One document per tweet");
+ checkbox = new JCheckBox();
+ checkbox.setSelected(config.getOneDocCheckbox());
+ checkboxBox.add(checkboxLabel);
+ checkboxBox.add(Box.createHorizontalGlue());
+ checkboxBox.add(checkbox);
+ dialog.add(checkboxBox);
+ dialog.add(Box.createVerticalStrut(4));
+
+ contentKeysEditor = new ListEditor("Content keys: ", config.getContentKeys());
+ contentKeysEditor.setToolTipText("JSON key paths to be turned into DocumentContent");
+ dialog.add(contentKeysEditor);
+ dialog.add(Box.createVerticalStrut(4));
+
+ featureKeysEditor = new ListEditor("Feature keys: ", config.getFeatureKeys());
+ featureKeysEditor.setToolTipText("JSON key paths to be turned into Tweet annotation features");
+ dialog.add(featureKeysEditor);
+ dialog.add(Box.createVerticalStrut(6));
+
+ Box configPersistenceBox = Box.createHorizontalBox();
+ configPersistenceBox.add(Box.createHorizontalGlue());
+ JButton loadConfigButton = new JButton("Load configuration");
+ loadConfigButton.setToolTipText("Replace the configuration above with a previously saved one");
+ loadConfigButton.addActionListener(new LoadConfigListener(this));
+ configPersistenceBox.add(loadConfigButton);
+ configPersistenceBox.add(Box.createHorizontalGlue());
+ JButton saveConfigButton = new JButton("Save configuration");
+ saveConfigButton.setToolTipText("Save the configuration above for re-use");
+ saveConfigButton.addActionListener(new SaveConfigListener(this));
+ configPersistenceBox.add(saveConfigButton);
+ configPersistenceBox.add(Box.createHorizontalGlue());
+
+ // TODO keep these commented out on svn until reloading works properly
+ //dialog.add(configPersistenceBox);
+ //dialog.add(Box.createVerticalStrut(5));
+
+ dialog.add(new JSeparator(SwingConstants.HORIZONTAL));
+ dialog.add(Box.createVerticalStrut(2));
+
+ chooser = new JFileChooser();
+ chooser.setFileSelectionMode(JFileChooser.FILES_ONLY);
+ chooser.setMultiSelectionEnabled(true);
+ chooser.setDialogTitle("Select a Twitter JSON file");
+ chooser.resetChoosableFileFilters();
+ chooser.setAcceptAllFileFilterUsed(false);
+ ExtensionFileFilter filter = new ExtensionFileFilter("Twitter JSON files (*.json)", "json");
+ chooser.addChoosableFileFilter(filter);
+ chooser.setFileFilter(filter);
+ chooser.setApproveButtonText("Populate");
+ chooser.addActionListener(new PopulationDialogListener(this));
+
+ dialog.add(chooser);
+ dialog.pack();
+ dialog.setLocationRelativeTo(dialog.getOwner());
+ dialog.setVisible(true);
+ }
+
+
+ public String getEncoding() {
+ return this.config.getEncoding();
+ }
+
+ public List<URL> getFileUrls() throws MalformedURLException {
+ return this.fileUrls;
+ }
+
+ public int getTweetsPerDoc() {
+ return this.config.getTweetsPerDoc();
+ }
+
+ public List<String> getContentKeys() {
+ return this.config.getContentKeys();
+ }
+
+ public List<String> getFeatureKeys() {
+ return this.config.getFeatureKeys();
+ }
+
+
+ protected void updateConfig() {
+ this.config.setTweetsPerDoc(this.checkbox.isSelected() ? 1 : 0);
+ this.config.setContentKeys(this.contentKeysEditor.getValues());
+ this.config.setFeatureKeys(this.featureKeysEditor.getValues());
+ this.config.setEncoding(this.encodingField.getText());
+ }
+
+
+ protected void updateGui() {
+ this.encodingField.setText(config.getEncoding());
+ this.contentKeysEditor.setValues(config.getContentKeys());
+ this.featureKeysEditor.setValues(config.getFeatureKeys());
+ this.checkbox.setSelected(config.getOneDocCheckbox());
+ }
+
+
+ protected void loadFile() {
+ updateConfig();
+
+ try {
+ this.fileUrls = new ArrayList<URL>();
+ for (File file : this.chooser.getSelectedFiles()) {
+ this.fileUrls.add(file.toURI().toURL());
+ }
+ }
+ catch (MalformedURLException e) {
+ e.printStackTrace();
+ }
+ finally {
+ this.dialog.dispose();
+ }
+ }
+
+
+ protected void cancel() {
+ this.dialog.dispose();
+ }
+
+}
+
+
+class PopulationDialogListener implements ActionListener {
+
+ private PopulationDialogWrapper dialog;
+
+ public PopulationDialogListener(PopulationDialogWrapper dialog) {
+ this.dialog = dialog;
+ }
+
+
+ @Override
+ public void actionPerformed(ActionEvent event) {
+ if (event.getActionCommand().equals(JFileChooser.APPROVE_SELECTION)){
+ this.dialog.loadFile();
+ }
+ else {
+ this.dialog.cancel();
+ }
+ }
+
+}
+
+
+class ListEditor extends JPanel {
+ private static final long serialVersionUID = -1578463259277343578L;
+
+ private JButton listButton;
+ private ListEditorDialog listEditor;
+ private List<String> values;
+ private JLabel label;
+ private JTextField field;
+
+ @Override
+ public void setToolTipText(String text) {
+ super.setToolTipText(text);
+ label.setToolTipText(text);
+ field.setToolTipText(text);
+ }
+
+
+ public ListEditor(String labelString, List<String> initialValues) {
+ label = new JLabel(labelString);
+ field = new JTextField();
+ values = initialValues;
+ field.setText(Strings.toString(initialValues));
+ field.setEditable(false);
+
+ listEditor = new ListEditorDialog(SwingUtilities.getAncestorOfClass(
+ Window.class, this), values, List.class, String.class.getName());
+
+ listButton = new JButton(MainFrame.getIcon("edit-list"));
+ listButton.setToolTipText("Edit the list");
+
+ listButton.addActionListener(new ActionListener() {
+ @SuppressWarnings("unchecked")
+ public void actionPerformed(ActionEvent e) {
+ List<?> returnedList = listEditor.showDialog();
+ if(returnedList != null) {
+ values = (List<String>) returnedList;
+ field.setText(Strings.toString(returnedList));
+ }
+ }
+ });
+
+ this.setLayout(new BoxLayout(this, BoxLayout.X_AXIS));
+ this.add(label);
+ this.add(field);
+ this.add(listButton);
+ }
+
+
+ public List<String> getValues() {
+ return this.values;
+ }
+
+ public void setValues(List<String> values) {
+ this.values = values;
+ this.field.setText(Strings.toString(values));
+ }
+
+}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ada...@us...> - 2013-09-27 12:53:56
|
Revision: 16949
http://sourceforge.net/p/gate/code/16949
Author: adamfunk
Date: 2013-09-27 12:53:53 +0000 (Fri, 27 Sep 2013)
Log Message:
-----------
Put all the constants in one place, so they are easier to find
Modified Paths:
--------------
gate/trunk/plugins/Twitter/src/gate/corpora/JSONTweetFormat.java
gate/trunk/plugins/Twitter/src/gate/corpora/twitter/Population.java
gate/trunk/plugins/Twitter/src/gate/corpora/twitter/PopulationConfig.java
gate/trunk/plugins/Twitter/src/gate/corpora/twitter/PreAnnotation.java
gate/trunk/plugins/Twitter/src/gate/corpora/twitter/Tweet.java
gate/trunk/plugins/Twitter/src/gate/corpora/twitter/TweetUtils.java
Modified: gate/trunk/plugins/Twitter/src/gate/corpora/JSONTweetFormat.java
===================================================================
--- gate/trunk/plugins/Twitter/src/gate/corpora/JSONTweetFormat.java 2013-09-27 11:31:54 UTC (rev 16948)
+++ gate/trunk/plugins/Twitter/src/gate/corpora/JSONTweetFormat.java 2013-09-27 12:53:53 UTC (rev 16949)
@@ -38,8 +38,6 @@
public class JSONTweetFormat extends TextualDocumentFormat {
private static final long serialVersionUID = 6878020036304333918L;
- public static final String TEXT_ATTRIBUTE = "text";
- public static final String TWEET_ANNOTATION_TYPE = "Tweet";
/** Default construction */
public JSONTweetFormat() { super();}
Modified: gate/trunk/plugins/Twitter/src/gate/corpora/twitter/Population.java
===================================================================
--- gate/trunk/plugins/Twitter/src/gate/corpora/twitter/Population.java 2013-09-27 11:31:54 UTC (rev 16948)
+++ gate/trunk/plugins/Twitter/src/gate/corpora/twitter/Population.java 2013-09-27 12:53:53 UTC (rev 16949)
@@ -50,9 +50,6 @@
private static final long serialVersionUID = 1443073039199794668L;
- public static final String[] DEFAULT_CONTENT_KEYS = {"text", "created_at", "user:name"};
- public static final String[] DEFAULT_FEATURE_KEYS = {"user:screen_name", "user:location",
- "id", "source", "truncated", "retweeted_status:id"};
public static void populateCorpus(final Corpus corpus, URL inputUrl, PopulationConfig config)
Modified: gate/trunk/plugins/Twitter/src/gate/corpora/twitter/PopulationConfig.java
===================================================================
--- gate/trunk/plugins/Twitter/src/gate/corpora/twitter/PopulationConfig.java 2013-09-27 11:31:54 UTC (rev 16948)
+++ gate/trunk/plugins/Twitter/src/gate/corpora/twitter/PopulationConfig.java 2013-09-27 12:53:53 UTC (rev 16949)
@@ -70,8 +70,8 @@
public PopulationConfig() {
this.tweetsPerDoc = 0;
this.encoding = TweetUtils.DEFAULT_ENCODING;
- this.contentKeys = Arrays.asList(Population.DEFAULT_CONTENT_KEYS);
- this.featureKeys = Arrays.asList(Population.DEFAULT_FEATURE_KEYS);
+ this.contentKeys = Arrays.asList(TweetUtils.DEFAULT_CONTENT_KEYS);
+ this.featureKeys = Arrays.asList(TweetUtils.DEFAULT_FEATURE_KEYS);
}
Modified: gate/trunk/plugins/Twitter/src/gate/corpora/twitter/PreAnnotation.java
===================================================================
--- gate/trunk/plugins/Twitter/src/gate/corpora/twitter/PreAnnotation.java 2013-09-27 11:31:54 UTC (rev 16948)
+++ gate/trunk/plugins/Twitter/src/gate/corpora/twitter/PreAnnotation.java 2013-09-27 12:53:53 UTC (rev 16949)
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011--2012, The University of Sheffield.
+ * Copyright (c) 2011--2013, The University of Sheffield.
*
* This file is part of GATE (see http://gate.ac.uk/), and is free
* software, licenced under the GNU Library General Public License,
Modified: gate/trunk/plugins/Twitter/src/gate/corpora/twitter/Tweet.java
===================================================================
--- gate/trunk/plugins/Twitter/src/gate/corpora/twitter/Tweet.java 2013-09-27 11:31:54 UTC (rev 16948)
+++ gate/trunk/plugins/Twitter/src/gate/corpora/twitter/Tweet.java 2013-09-27 12:53:53 UTC (rev 16949)
@@ -1,6 +1,4 @@
/*
- * Tweet.java
- *
* Copyright (c) 1995-2013, The University of Sheffield. See the file
* COPYRIGHT.txt in the software or at http://gate.ac.uk/gate/COPYRIGHT.txt
*
@@ -15,22 +13,11 @@
import gate.*;
import gate.util.*;
-import gate.corpora.*;
-
import java.util.*;
-
import org.apache.commons.lang.StringEscapeUtils;
-
import com.fasterxml.jackson.databind.JsonNode;
-// Jackson API
-// http://wiki.fasterxml.com/JacksonHome
-
-// Standard: RFC 4627
-// https://tools.ietf.org/html/rfc4627
-
-
public class Tweet {
private String string;
private long start;
@@ -81,7 +68,7 @@
while (keys.hasNext()) {
String key = keys.next();
- if (key.equals(JSONTweetFormat.TEXT_ATTRIBUTE)) {
+ if (key.equals(TweetUtils.DEFAULT_TEXT_ATTRIBUTE)) {
string = StringEscapeUtils.unescapeHtml(json.get(key).asText());
}
else {
@@ -89,7 +76,7 @@
}
}
- annotations.add(new PreAnnotation(0L, string.length(), JSONTweetFormat.TWEET_ANNOTATION_TYPE, features));
+ annotations.add(new PreAnnotation(0L, string.length(), TweetUtils.TWEET_ANNOTATION_TYPE, features));
}
@@ -128,7 +115,7 @@
}
// Create the main annotation and the content.
- this.annotations.add(new PreAnnotation(0, content.length(), JSONTweetFormat.TWEET_ANNOTATION_TYPE, annoFeatures));
+ this.annotations.add(new PreAnnotation(0, content.length(), TweetUtils.TWEET_ANNOTATION_TYPE, annoFeatures));
this.string = content.toString();
}
Modified: gate/trunk/plugins/Twitter/src/gate/corpora/twitter/TweetUtils.java
===================================================================
--- gate/trunk/plugins/Twitter/src/gate/corpora/twitter/TweetUtils.java 2013-09-27 11:31:54 UTC (rev 16948)
+++ gate/trunk/plugins/Twitter/src/gate/corpora/twitter/TweetUtils.java 2013-09-27 12:53:53 UTC (rev 16949)
@@ -1,6 +1,4 @@
/*
- * TweetUtils.java
- *
* Copyright (c) 1995-2013, The University of Sheffield. See the file
* COPYRIGHT.txt in the software or at http://gate.ac.uk/gate/COPYRIGHT.txt
*
@@ -17,24 +15,34 @@
import java.io.IOException;
import java.util.*;
+
import org.apache.commons.lang.StringUtils;
+
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.node.ArrayNode;
+/* REFERENCES
+ * Jackson API
+ * http://wiki.fasterxml.com/JacksonHome
+ * Standard: RFC 4627
+ * https://tools.ietf.org/html/rfc4627
+ * */
-// Jackson API
-// http://wiki.fasterxml.com/JacksonHome
-
-// Standard: RFC 4627
-// https://tools.ietf.org/html/rfc4627
-
public class TweetUtils {
public static final String PATH_SEPARATOR = ":";
public static final String MIME_TYPE = "text/x-json-twitter";
public static final String DEFAULT_ENCODING = "UTF-8";
+ public static final String TWEET_ANNOTATION_TYPE = "Tweet";
+ public static final String DEFAULT_TEXT_ATTRIBUTE = "text";
+
+ public static final String[] DEFAULT_CONTENT_KEYS = {DEFAULT_TEXT_ATTRIBUTE,
+ "created_at", "user:name"};
+ public static final String[] DEFAULT_FEATURE_KEYS = {"user:screen_name",
+ "user:location", "id", "source", "truncated", "retweeted_status:id"};
+
public static List<Tweet> readTweets(String string) throws IOException {
if (string.startsWith("[")) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mar...@us...> - 2013-09-27 11:31:56
|
Revision: 16948
http://sourceforge.net/p/gate/code/16948
Author: markagreenwood
Date: 2013-09-27 11:31:54 +0000 (Fri, 27 Sep 2013)
Log Message:
-----------
minimal documentation on the Russian plugin, based on me not really knowing what it does given I can't read Russian -- will try and add some more details in the future when I have a better understanding of the different PRs
Modified Paths:
--------------
userguide/trunk/language-creole.tex
userguide/trunk/recent-changes.tex
Modified: userguide/trunk/language-creole.tex
===================================================================
--- userguide/trunk/language-creole.tex 2013-09-27 09:59:23 UTC (rev 16947)
+++ userguide/trunk/language-creole.tex 2013-09-27 11:31:54 UTC (rev 16948)
@@ -6,7 +6,7 @@
\nnormalsize
There are plugins available for processing the following languages:
-French, German, Italian, Chinese, Arabic, Romanian, Hindi and
+French, German, Italian, Chinese, Arabic, Romanian, Hindi, Russian, and
Cebuano. Some of the applications are quite basic and just contain
some useful processing resources to get you started when developing a
full application. Others (Cebuano and Hindi) are more like toy systems
@@ -310,3 +310,11 @@
language. You need to have the ANNIE plugin loaded first in order to load any of
these PRs. With the Hindi, you can create an application similar to ANNIE but
replacing the ANNIE PRs with the default PRs from the plugin.
+
+\sect[sec:misc-creole:language-plugins:russian]{Russian Plugin}
+
+The Russian plugin (\verb|Lang_Russian|) contains a set of resource for a Russian
+IE application which mirrors the construction of ANNIE. This includes custom
+components for part-of-speech tagging, morphological analysis and gazetteer
+lookup. A number of ready-made applications are also available which combine
+these resources together in a number of ways.
Modified: userguide/trunk/recent-changes.tex
===================================================================
--- userguide/trunk/recent-changes.tex 2013-09-27 09:59:23 UTC (rev 16947)
+++ userguide/trunk/recent-changes.tex 2013-09-27 11:31:54 UTC (rev 16948)
@@ -54,6 +54,10 @@
Infoset format. This format gives space savings of around 80\% when used to store
GATE XML documents. For full details see Section \ref{sec:creole:fastinfoset}.
+New support for processing Russian including a part-of-speech tagger, morphological
+analyser and a gazetteer. See Section \ref{sec:misc-creole:language-plugins:russian}
+for more details.
+
\rcSubsect{March 2013}
Fixed a bug which caused the 7.1 version of the OntoRootGazetteer to produce no
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ada...@us...> - 2013-09-27 09:59:25
|
Revision: 16947
http://sourceforge.net/p/gate/code/16947
Author: adamfunk
Date: 2013-09-27 09:59:23 +0000 (Fri, 27 Sep 2013)
Log Message:
-----------
Still debugging the reloading part
Modified Paths:
--------------
gate/trunk/plugins/Twitter/src/gate/corpora/twitter/Population.java
gate/trunk/plugins/Twitter/src/gate/corpora/twitter/PopulationConfig.java
Modified: gate/trunk/plugins/Twitter/src/gate/corpora/twitter/Population.java
===================================================================
--- gate/trunk/plugins/Twitter/src/gate/corpora/twitter/Population.java 2013-09-27 09:01:08 UTC (rev 16946)
+++ gate/trunk/plugins/Twitter/src/gate/corpora/twitter/Population.java 2013-09-27 09:59:23 UTC (rev 16947)
@@ -256,14 +256,16 @@
configPersistenceBox.add(Box.createHorizontalGlue());
JButton loadConfigButton = new JButton("Load configuration");
loadConfigButton.setToolTipText("Replace the configuration above with a previously saved one");
- loadConfigButton.addActionListener(new LoadConfigListener(config, dialog));
+ loadConfigButton.addActionListener(new LoadConfigListener(config, this));
configPersistenceBox.add(loadConfigButton);
configPersistenceBox.add(Box.createHorizontalGlue());
JButton saveConfigButton = new JButton("Save configuration");
saveConfigButton.setToolTipText("Save the configuration above for re-use");
- saveConfigButton.addActionListener(new SaveConfigListener(config, dialog));
+ saveConfigButton.addActionListener(new SaveConfigListener(config, this));
configPersistenceBox.add(saveConfigButton);
configPersistenceBox.add(Box.createHorizontalGlue());
+
+ // TODO keep these commented out on svn until reloading works properly
//dialog.add(configPersistenceBox);
//dialog.add(Box.createVerticalStrut(5));
@@ -318,6 +320,14 @@
}
+ protected void updateGui() {
+ this.encodingField.setText(config.getEncoding());
+ this.contentKeysEditor.setValues(config.getContentKeys());
+ this.featureKeysEditor.setValues(config.getFeatureKeys());
+ this.checkbox.setSelected(config.getOneDocCheckbox());
+ }
+
+
protected void loadFile() {
updateConfig();
@@ -417,4 +427,9 @@
return this.values;
}
+ public void setValues(List<String> values) {
+ this.values = values;
+ this.field.setText(Strings.toString(values));
+ }
+
}
Modified: gate/trunk/plugins/Twitter/src/gate/corpora/twitter/PopulationConfig.java
===================================================================
--- gate/trunk/plugins/Twitter/src/gate/corpora/twitter/PopulationConfig.java 2013-09-27 09:01:08 UTC (rev 16946)
+++ gate/trunk/plugins/Twitter/src/gate/corpora/twitter/PopulationConfig.java 2013-09-27 09:59:23 UTC (rev 16947)
@@ -12,14 +12,12 @@
package gate.corpora.twitter;
+import gate.Gate;
import java.util.*;
import java.io.*;
import java.net.URL;
import java.awt.event.*;
-import java.awt.Component;
-
import javax.swing.JFileChooser;
-
import com.thoughtworks.xstream.XStream;
import com.thoughtworks.xstream.io.xml.PrettyPrintWriter;
import com.thoughtworks.xstream.io.xml.StaxDriver;
@@ -111,14 +109,17 @@
public static PopulationConfig load(File file) {
XStream xstream = new XStream(new StaxDriver());
+ xstream.setClassLoader(Gate.getClassLoader());
return (PopulationConfig) xstream.fromXML(file);
}
public static PopulationConfig load(URL url) {
XStream xstream = new XStream(new StaxDriver());
+ xstream.setClassLoader(Gate.getClassLoader());
return (PopulationConfig) xstream.fromXML(url);
}
+
public void saveXML(File file) throws IOException {
XStream xstream = new XStream(new StaxDriver());
PrettyPrintWriter ppw = new PrettyPrintWriter(new OutputStreamWriter(new FileOutputStream(file), "UTF-8"));
@@ -131,11 +132,11 @@
class LoadConfigListener implements ActionListener {
PopulationConfig config;
- Component parentDialog;
+ PopulationDialogWrapper wrapper;
- public LoadConfigListener(PopulationConfig config, Component dialog) {
+ public LoadConfigListener(PopulationConfig config, PopulationDialogWrapper wrapper) {
this.config = config;
- this.parentDialog = dialog;
+ this.wrapper = wrapper;
}
@Override
@@ -143,9 +144,10 @@
JFileChooser chooser = new JFileChooser();
chooser.setDialogTitle("Load XML configuration");
chooser.setFileSelectionMode(JFileChooser.FILES_ONLY);
- int chosen = chooser.showOpenDialog(this.parentDialog);
+ int chosen = chooser.showOpenDialog(this.wrapper.dialog);
if (chosen == JFileChooser.APPROVE_OPTION) {
config.reload(chooser.getSelectedFile());
+ wrapper.updateGui();
}
}
}
@@ -153,11 +155,11 @@
class SaveConfigListener implements ActionListener {
PopulationConfig config;
- Component parentDialog;
+ PopulationDialogWrapper wrapper;
- public SaveConfigListener(PopulationConfig config, Component dialog) {
+ public SaveConfigListener(PopulationConfig config, PopulationDialogWrapper wrapper) {
this.config = config;
- this.parentDialog = dialog;
+ this.wrapper = wrapper;
}
@Override
@@ -165,7 +167,7 @@
JFileChooser chooser = new JFileChooser();
chooser.setDialogTitle("Save configuration as XML");
chooser.setFileSelectionMode(JFileChooser.FILES_ONLY);
- int chosen = chooser.showSaveDialog(this.parentDialog);
+ int chosen = chooser.showSaveDialog(this.wrapper.dialog);
if (chosen == JFileChooser.APPROVE_OPTION) {
try {
config.saveXML(chooser.getSelectedFile());
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mar...@us...> - 2013-09-27 09:01:11
|
Revision: 16946
http://sourceforge.net/p/gate/code/16946
Author: markagreenwood
Date: 2013-09-27 09:01:08 +0000 (Fri, 27 Sep 2013)
Log Message:
-----------
added a helpURL to the @CreoleResource annotation to point to the new documentation
Modified Paths:
--------------
gate/trunk/plugins/Tagger_Stanford/src/gate/stanford/Tagger.java
Modified: gate/trunk/plugins/Tagger_Stanford/src/gate/stanford/Tagger.java
===================================================================
--- gate/trunk/plugins/Tagger_Stanford/src/gate/stanford/Tagger.java 2013-09-27 09:00:26 UTC (rev 16945)
+++ gate/trunk/plugins/Tagger_Stanford/src/gate/stanford/Tagger.java 2013-09-27 09:01:08 UTC (rev 16946)
@@ -48,7 +48,7 @@
/**
* This class is a wrapper for the Stanford PoS tagger v3.2.0.
*/
-@CreoleResource(name = "Stanford POS Tagger", comment = "Stanford Part-of-Speech Tagger", icon = "pos-tagger")
+@CreoleResource(name = "Stanford POS Tagger", comment = "Stanford Part-of-Speech Tagger", icon = "pos-tagger", helpURL="http://gate.ac.uk/userguide/sec:misc:creole:stanford")
public class Tagger extends AbstractLanguageAnalyser {
private static final long serialVersionUID = -6001372186847970081L;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mar...@us...> - 2013-09-27 09:00:30
|
Revision: 16945
http://sourceforge.net/p/gate/code/16945
Author: markagreenwood
Date: 2013-09-27 09:00:26 +0000 (Fri, 27 Sep 2013)
Log Message:
-----------
added documentation for the Tagger_Stanford plugin
Modified Paths:
--------------
userguide/trunk/misc-creole.tex
userguide/trunk/recent-changes.tex
Modified: userguide/trunk/misc-creole.tex
===================================================================
--- userguide/trunk/misc-creole.tex 2013-09-27 01:21:05 UTC (rev 16944)
+++ userguide/trunk/misc-creole.tex 2013-09-27 09:00:26 UTC (rev 16945)
@@ -2792,7 +2792,47 @@
\htlink{https://opennlp.apache.org/documentation.html}{the OpenNLP document} for
details.
%%
+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\sect[sec:misc:creole:stanford]{Stanford Part-of-Speech Tagger}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+To use the Stanford Part-of-Speech tagger\footnote{\url{http://www-nlp.stanford.edu/software/tagger.shtml}}
+within GATE you need first to load the \verb|Tagger_Stanford| plugin.
+
+The PR is configured using the following initialization time parameters:
+
+\begin{itemize}
+\item \textbf{modelFile:} the URL to the POS tagger model. This defaults to a
+ fast English model but further models for other languages are available from the
+ \htlink{http://www-nlp.stanford.edu/software/tagger.shtml}{tagger's homepage}.
+\end{itemize}
+
+Further configuration of the tagger is via the following runtime parameters:
+
+\begin{itemize}
+\item \textbf{baseSentenceAnnotationType:} the input annotation type which
+ represents sentences; defaults to Sentence.
+\item \textbf{baseTokenAnnotationType:} the input annotation type which
+ represents tokens; defaults to Token
+\item \textbf{failOnMissingInputAnnotations:} if true and no annotations of
+ the types specified in the previous two options are found then an an
+ exception will be thrown halting any further processing. If false, a warning
+ will be printed instead and processing will continue. Defaults to true to help
+ quickly catch misconfiguration during application development.
+\item \textbf{inputASName:} the name of the annotation set that serves as input
+ to the tagger (i.e. where the tagger will look for sentences and tokens to
+ process); defaults to the default unnamed annotation set.
+\item \textbf{outputASName:} the name of the annotation set into which the
+ results of running the tagger will be stored; defaults to the default unnamed
+ annotation set.
+\item \textbf{outputAnnotationType:} the annotation type which will be created,
+ or updated, with the results of running the tagger; defaults to Token.
+\item \textbf{posTagAllTokens:} if true all tokens will be processed, including
+ those that do not fall within a sentence; defaults to true.
+\end{itemize}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\sect[sec:misc-creole:boilerpipe]{Content Detection Using Boilerpipe}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Modified: userguide/trunk/recent-changes.tex
===================================================================
--- userguide/trunk/recent-changes.tex 2013-09-27 01:21:05 UTC (rev 16944)
+++ userguide/trunk/recent-changes.tex 2013-09-27 09:00:26 UTC (rev 16945)
@@ -36,6 +36,9 @@
definately isn't).
\end{itemize}
+A new plugin that wraps the Stanford Part-of-Speech tagger. See Section
+\ref{sec:misc:creole:stanford} for details.
+
\rcSubsect{August 2013}
Added support for Resource Helpers which can added new features to exisiting
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gat...@us...> - 2013-09-27 01:21:09
|
Revision: 16944
http://sourceforge.net/p/gate/code/16944
Author: gate-project
Date: 2013-09-27 01:21:05 +0000 (Fri, 27 Sep 2013)
Log Message:
-----------
Build number update (build 4673)
Modified Paths:
--------------
gate/trunk/build/build.properties
gate/trunk/build/build.txt
Modified: gate/trunk/build/build.properties
===================================================================
--- gate/trunk/build/build.properties 2013-09-26 16:15:30 UTC (rev 16943)
+++ gate/trunk/build/build.properties 2013-09-27 01:21:05 UTC (rev 16944)
@@ -1,4 +1,4 @@
#Build Number for ANT. Do not edit!
-#Thu Sep 26 02:09:54 BST 2013
+#Fri Sep 27 02:12:07 BST 2013
cvs.version=$Id\: build.properties 7542 2006-07-17 14\:26\:51Z ian_roberts $
-build.number=4673
+build.number=4674
Modified: gate/trunk/build/build.txt
===================================================================
--- gate/trunk/build/build.txt 2013-09-26 16:15:30 UTC (rev 16943)
+++ gate/trunk/build/build.txt 2013-09-27 01:21:05 UTC (rev 16944)
@@ -1 +1 @@
-4672
\ No newline at end of file
+4673
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <va...@us...> - 2013-09-26 16:15:33
|
Revision: 16943
http://sourceforge.net/p/gate/code/16943
Author: valyt
Date: 2013-09-26 16:15:30 +0000 (Thu, 26 Sep 2013)
Log Message:
-----------
Started updating to latest Weka. The plugin currently compiles, though it may not work as expected.
Modified Paths:
--------------
gate/trunk/plugins/Machine_Learning/.classpath
gate/trunk/plugins/Machine_Learning/src/gate/creole/ml/weka/StringToNominalFilter.java
Added Paths:
-----------
gate/trunk/plugins/Machine_Learning/lib/src/
gate/trunk/plugins/Machine_Learning/lib/src/weka-3.6.10-src.jar
gate/trunk/plugins/Machine_Learning/lib/weka-3.6.10.jar
Removed Paths:
-------------
gate/trunk/plugins/Machine_Learning/lib/weka-3.4.6.jar
Modified: gate/trunk/plugins/Machine_Learning/.classpath
===================================================================
--- gate/trunk/plugins/Machine_Learning/.classpath 2013-09-26 16:03:07 UTC (rev 16942)
+++ gate/trunk/plugins/Machine_Learning/.classpath 2013-09-26 16:15:30 UTC (rev 16943)
@@ -3,9 +3,9 @@
<classpathentry kind="src" path="src"/>
<classpathentry kind="lib" path="lib/maxent-2.4.0.jar"/>
<classpathentry kind="lib" path="lib/troveForMaxent.jar"/>
- <classpathentry kind="lib" path="lib/weka-3.4.6.jar"/>
<classpathentry kind="lib" path="machinelearning.jar"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
<classpathentry combineaccessrules="false" kind="src" path="/GATE"/>
+ <classpathentry kind="lib" path="lib/weka-3.6.10.jar" sourcepath="lib/src/weka-3.6.10-src.jar"/>
<classpathentry kind="output" path="classes"/>
</classpath>
Added: gate/trunk/plugins/Machine_Learning/lib/src/weka-3.6.10-src.jar
===================================================================
(Binary files differ)
Index: gate/trunk/plugins/Machine_Learning/lib/src/weka-3.6.10-src.jar
===================================================================
--- gate/trunk/plugins/Machine_Learning/lib/src/weka-3.6.10-src.jar 2013-09-26 16:03:07 UTC (rev 16942)
+++ gate/trunk/plugins/Machine_Learning/lib/src/weka-3.6.10-src.jar 2013-09-26 16:15:30 UTC (rev 16943)
Property changes on: gate/trunk/plugins/Machine_Learning/lib/src/weka-3.6.10-src.jar
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Deleted: gate/trunk/plugins/Machine_Learning/lib/weka-3.4.6.jar
===================================================================
(Binary files differ)
Added: gate/trunk/plugins/Machine_Learning/lib/weka-3.6.10.jar
===================================================================
(Binary files differ)
Index: gate/trunk/plugins/Machine_Learning/lib/weka-3.6.10.jar
===================================================================
--- gate/trunk/plugins/Machine_Learning/lib/weka-3.6.10.jar 2013-09-26 16:03:07 UTC (rev 16942)
+++ gate/trunk/plugins/Machine_Learning/lib/weka-3.6.10.jar 2013-09-26 16:15:30 UTC (rev 16943)
Property changes on: gate/trunk/plugins/Machine_Learning/lib/weka-3.6.10.jar
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Modified: gate/trunk/plugins/Machine_Learning/src/gate/creole/ml/weka/StringToNominalFilter.java
===================================================================
--- gate/trunk/plugins/Machine_Learning/src/gate/creole/ml/weka/StringToNominalFilter.java 2013-09-26 16:03:07 UTC (rev 16942)
+++ gate/trunk/plugins/Machine_Learning/src/gate/creole/ml/weka/StringToNominalFilter.java 2013-09-26 16:15:30 UTC (rev 16943)
@@ -296,17 +296,13 @@
}
/**
- * Checks whether the aqttribute at a particular index in the input dataset
+ * Checks whether the attribute at a particular index in the input dataset
* is string.
* @param index
* @return a <tt>boolean</tt> value.
*/
protected boolean isString(int index){
-
- int[] stringIndices = getInputStringIndex();
- for(int i = 0; i < stringIndices.length; i++)
- if(stringIndices[i] == index) return true;
- return false;
+ return getInputFormat().attribute(index).isString();
}
public Enumeration listOptions() {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <va...@us...> - 2013-09-26 16:03:11
|
Revision: 16942
http://sourceforge.net/p/gate/code/16942
Author: valyt
Date: 2013-09-26 16:03:07 +0000 (Thu, 26 Sep 2013)
Log Message:
-----------
Made the ML plugin into its own Eclipse project.
Changed the output folder to 'classes' to align with the current convention.
Modified Paths:
--------------
gate/trunk/plugins/Machine_Learning/build.xml
Added Paths:
-----------
gate/trunk/plugins/Machine_Learning/.classpath
gate/trunk/plugins/Machine_Learning/.project
gate/trunk/plugins/Machine_Learning/.settings/
gate/trunk/plugins/Machine_Learning/.settings/org.eclipse.jdt.core.prefs
Property Changed:
----------------
gate/trunk/plugins/Machine_Learning/
Index: gate/trunk/plugins/Machine_Learning
===================================================================
--- gate/trunk/plugins/Machine_Learning 2013-09-26 15:10:36 UTC (rev 16941)
+++ gate/trunk/plugins/Machine_Learning 2013-09-26 16:03:07 UTC (rev 16942)
Property changes on: gate/trunk/plugins/Machine_Learning
___________________________________________________________________
Modified: svn:ignore
## -1,4 +1,4 ##
-build
+classes
machinelearning.jar
mltests.jar
TEST*.xml
Added: gate/trunk/plugins/Machine_Learning/.classpath
===================================================================
--- gate/trunk/plugins/Machine_Learning/.classpath (rev 0)
+++ gate/trunk/plugins/Machine_Learning/.classpath 2013-09-26 16:03:07 UTC (rev 16942)
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="lib" path="lib/maxent-2.4.0.jar"/>
+ <classpathentry kind="lib" path="lib/troveForMaxent.jar"/>
+ <classpathentry kind="lib" path="lib/weka-3.4.6.jar"/>
+ <classpathentry kind="lib" path="machinelearning.jar"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+ <classpathentry combineaccessrules="false" kind="src" path="/GATE"/>
+ <classpathentry kind="output" path="classes"/>
+</classpath>
Property changes on: gate/trunk/plugins/Machine_Learning/.classpath
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: gate/trunk/plugins/Machine_Learning/.project
===================================================================
--- gate/trunk/plugins/Machine_Learning/.project (rev 0)
+++ gate/trunk/plugins/Machine_Learning/.project 2013-09-26 16:03:07 UTC (rev 16942)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>gate-plugin-machine-learning</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
Property changes on: gate/trunk/plugins/Machine_Learning/.project
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: gate/trunk/plugins/Machine_Learning/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- gate/trunk/plugins/Machine_Learning/.settings/org.eclipse.jdt.core.prefs (rev 0)
+++ gate/trunk/plugins/Machine_Learning/.settings/org.eclipse.jdt.core.prefs 2013-09-26 16:03:07 UTC (rev 16942)
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.6
Property changes on: gate/trunk/plugins/Machine_Learning/.settings/org.eclipse.jdt.core.prefs
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: gate/trunk/plugins/Machine_Learning/build.xml
===================================================================
--- gate/trunk/plugins/Machine_Learning/build.xml 2013-09-26 15:10:36 UTC (rev 16941)
+++ gate/trunk/plugins/Machine_Learning/build.xml 2013-09-26 16:03:07 UTC (rev 16942)
@@ -5,7 +5,7 @@
<property file="build.properties" />
<property name="src" location="src"/>
- <property name="build" location="build"/>
+ <property name="build" location="classes"/>
<property name="dist" location="dist"/>
<property name="jar.location" location="machinelearning.jar" />
<property name="test.jar.location" location="mltests.jar" />
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ian...@us...> - 2013-09-26 15:10:39
|
Revision: 16941
http://sourceforge.net/p/gate/code/16941
Author: ian_roberts
Date: 2013-09-26 15:10:36 +0000 (Thu, 26 Sep 2013)
Log Message:
-----------
Tell the various JWS GUIs to use ~/(.)gate-teamware.xml instead of
~/(.)gate.xml as their user config file, to avoid teamware and GATE Developer
treading on each other's toes when run on the same machine.
Modified Paths:
--------------
teamware/trunk/annic-gui/src/gleam/annic/AnnicGUI.java
teamware/trunk/annotation-diff-gui/src/gleam/annotationdiffgui/AnnotationDiffGUI.java
teamware/trunk/annotator-gui/src/gleam/annotatorgui/AnnotatorGUI.java
Modified: teamware/trunk/annic-gui/src/gleam/annic/AnnicGUI.java
===================================================================
--- teamware/trunk/annic-gui/src/gleam/annic/AnnicGUI.java 2013-09-26 15:05:25 UTC (rev 16940)
+++ teamware/trunk/annic-gui/src/gleam/annic/AnnicGUI.java 2013-09-26 15:10:36 UTC (rev 16941)
@@ -226,6 +226,9 @@
fos.close();
is.close();
}
+ // read a teamware-specific user config rather than the same one GATE Developer uses
+ File userConfig = new File(System.getProperty("user.home"), Gate.runningOnUnix() ? ".gate-teamware.xml" : "gate-teamware.xml");
+ Gate.setUserConfigFile(userConfig);
try {
Gate.init();
gate.Main.applyUserPreferences();
Modified: teamware/trunk/annotation-diff-gui/src/gleam/annotationdiffgui/AnnotationDiffGUI.java
===================================================================
--- teamware/trunk/annotation-diff-gui/src/gleam/annotationdiffgui/AnnotationDiffGUI.java 2013-09-26 15:05:25 UTC (rev 16940)
+++ teamware/trunk/annotation-diff-gui/src/gleam/annotationdiffgui/AnnotationDiffGUI.java 2013-09-26 15:10:36 UTC (rev 16941)
@@ -206,6 +206,9 @@
is.close();
}
+ // read a teamware-specific user config rather than the same one GATE Developer uses
+ File userConfig = new File(System.getProperty("user.home"), Gate.runningOnUnix() ? ".gate-teamware.xml" : "gate-teamware.xml");
+ Gate.setUserConfigFile(userConfig);
// Initialize the framework Gate
try {
Gate.init();
Modified: teamware/trunk/annotator-gui/src/gleam/annotatorgui/AnnotatorGUI.java
===================================================================
--- teamware/trunk/annotator-gui/src/gleam/annotatorgui/AnnotatorGUI.java 2013-09-26 15:05:25 UTC (rev 16940)
+++ teamware/trunk/annotator-gui/src/gleam/annotatorgui/AnnotatorGUI.java 2013-09-26 15:10:36 UTC (rev 16941)
@@ -378,6 +378,9 @@
fos.close();
is.close();
}
+ // read a teamware-specific user config rather than the same one GATE Developer uses
+ File userConfig = new File(System.getProperty("user.home"), Gate.runningOnUnix() ? ".gate-teamware.xml" : "gate-teamware.xml");
+ Gate.setUserConfigFile(userConfig);
try {
Gate.init();
// apply font and L&F preferences from user config
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ada...@us...> - 2013-09-26 15:05:29
|
Revision: 16940
http://sourceforge.net/p/gate/code/16940
Author: adamfunk
Date: 2013-09-26 15:05:25 +0000 (Thu, 26 Sep 2013)
Log Message:
-----------
WIP on persistence of twitter population configuration.
Bugs in reloading so those buttons are not in the live dialog box.
Modified Paths:
--------------
gate/trunk/plugins/Twitter/src/gate/corpora/twitter/Population.java
gate/trunk/plugins/Twitter/src/gate/corpora/twitter/PopulationConfig.java
Modified: gate/trunk/plugins/Twitter/src/gate/corpora/twitter/Population.java
===================================================================
--- gate/trunk/plugins/Twitter/src/gate/corpora/twitter/Population.java 2013-09-26 13:12:22 UTC (rev 16939)
+++ gate/trunk/plugins/Twitter/src/gate/corpora/twitter/Population.java 2013-09-26 15:05:25 UTC (rev 16940)
@@ -202,14 +202,11 @@
return actions;
}
-
-
-
}
class PopulationDialogWrapper {
- private JDialog dialog;
+ protected JDialog dialog;
private PopulationConfig config;
private JTextField encodingField;
private JCheckBox checkbox;
@@ -259,10 +256,12 @@
configPersistenceBox.add(Box.createHorizontalGlue());
JButton loadConfigButton = new JButton("Load configuration");
loadConfigButton.setToolTipText("Replace the configuration above with a previously saved one");
+ loadConfigButton.addActionListener(new LoadConfigListener(config, dialog));
configPersistenceBox.add(loadConfigButton);
configPersistenceBox.add(Box.createHorizontalGlue());
JButton saveConfigButton = new JButton("Save configuration");
saveConfigButton.setToolTipText("Save the configuration above for re-use");
+ saveConfigButton.addActionListener(new SaveConfigListener(config, dialog));
configPersistenceBox.add(saveConfigButton);
configPersistenceBox.add(Box.createHorizontalGlue());
//dialog.add(configPersistenceBox);
Modified: gate/trunk/plugins/Twitter/src/gate/corpora/twitter/PopulationConfig.java
===================================================================
--- gate/trunk/plugins/Twitter/src/gate/corpora/twitter/PopulationConfig.java 2013-09-26 13:12:22 UTC (rev 16939)
+++ gate/trunk/plugins/Twitter/src/gate/corpora/twitter/PopulationConfig.java 2013-09-26 15:05:25 UTC (rev 16940)
@@ -15,7 +15,11 @@
import java.util.*;
import java.io.*;
import java.net.URL;
+import java.awt.event.*;
+import java.awt.Component;
+import javax.swing.JFileChooser;
+
import com.thoughtworks.xstream.XStream;
import com.thoughtworks.xstream.io.xml.PrettyPrintWriter;
import com.thoughtworks.xstream.io.xml.StaxDriver;
@@ -71,6 +75,7 @@
this.contentKeys = Arrays.asList(Population.DEFAULT_CONTENT_KEYS);
this.featureKeys = Arrays.asList(Population.DEFAULT_FEATURE_KEYS);
}
+
/**
* Constructor with all options.
@@ -87,6 +92,23 @@
}
+ public void reload(File file) {
+ PopulationConfig source = PopulationConfig.load(file);
+ this.tweetsPerDoc = source.tweetsPerDoc;
+ this.encoding = source.encoding;
+ this.contentKeys = source.contentKeys;
+ this.featureKeys = source.featureKeys;
+ }
+
+ public void reload(URL url) {
+ PopulationConfig source = PopulationConfig.load(url);
+ this.tweetsPerDoc = source.tweetsPerDoc;
+ this.encoding = source.encoding;
+ this.contentKeys = source.contentKeys;
+ this.featureKeys = source.featureKeys;
+ }
+
+
public static PopulationConfig load(File file) {
XStream xstream = new XStream(new StaxDriver());
return (PopulationConfig) xstream.fromXML(file);
@@ -107,3 +129,54 @@
}
+class LoadConfigListener implements ActionListener {
+ PopulationConfig config;
+ Component parentDialog;
+
+ public LoadConfigListener(PopulationConfig config, Component dialog) {
+ this.config = config;
+ this.parentDialog = dialog;
+ }
+
+ @Override
+ public void actionPerformed(ActionEvent arg0) {
+ JFileChooser chooser = new JFileChooser();
+ chooser.setDialogTitle("Load XML configuration");
+ chooser.setFileSelectionMode(JFileChooser.FILES_ONLY);
+ int chosen = chooser.showOpenDialog(this.parentDialog);
+ if (chosen == JFileChooser.APPROVE_OPTION) {
+ config.reload(chooser.getSelectedFile());
+ }
+ }
+}
+
+
+class SaveConfigListener implements ActionListener {
+ PopulationConfig config;
+ Component parentDialog;
+
+ public SaveConfigListener(PopulationConfig config, Component dialog) {
+ this.config = config;
+ this.parentDialog = dialog;
+ }
+
+ @Override
+ public void actionPerformed(ActionEvent e) {
+ JFileChooser chooser = new JFileChooser();
+ chooser.setDialogTitle("Save configuration as XML");
+ chooser.setFileSelectionMode(JFileChooser.FILES_ONLY);
+ int chosen = chooser.showSaveDialog(this.parentDialog);
+ if (chosen == JFileChooser.APPROVE_OPTION) {
+ try {
+ config.saveXML(chooser.getSelectedFile());
+ }
+ catch(IOException e1) {
+ e1.printStackTrace();
+ }
+ }
+ }
+
+
+}
+
+
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ada...@us...> - 2013-09-26 13:12:26
|
Revision: 16939
http://sourceforge.net/p/gate/code/16939
Author: adamfunk
Date: 2013-09-26 13:12:22 +0000 (Thu, 26 Sep 2013)
Log Message:
-----------
Tooltips for those who love them.
WIP on config load/save.
Modified Paths:
--------------
gate/trunk/plugins/Twitter/src/gate/corpora/twitter/Population.java
Modified: gate/trunk/plugins/Twitter/src/gate/corpora/twitter/Population.java
===================================================================
--- gate/trunk/plugins/Twitter/src/gate/corpora/twitter/Population.java 2013-09-26 12:35:58 UTC (rev 16938)
+++ gate/trunk/plugins/Twitter/src/gate/corpora/twitter/Population.java 2013-09-26 13:12:22 UTC (rev 16939)
@@ -36,7 +36,9 @@
import javax.swing.JFileChooser;
import javax.swing.JLabel;
import javax.swing.JPanel;
+import javax.swing.JSeparator;
import javax.swing.JTextField;
+import javax.swing.SwingConstants;
import javax.swing.SwingUtilities;
import org.apache.commons.io.IOUtils;
@@ -126,7 +128,7 @@
private static Document newDocument(URL url, int counter, int digits) throws ResourceInstantiationException {
Document document = Factory.newDocument("");
- String code = StringUtils.rightPad(Integer.toString(counter), digits, '0');
+ String code = StringUtils.leftPad(Integer.toString(counter), digits, '0');
String name = StringUtils.stripToEmpty(StringUtils.substring(url.getPath(), 1)) + "_" + code;
document.setName(name);
document.setSourceUrl(url);
@@ -165,7 +167,7 @@
public void actionPerformed(ActionEvent e) {
final PopulationDialogWrapper dialog = new PopulationDialogWrapper();
- // if no file was selected then just stop
+ // If no files were selected then just stop
try {
final List<URL> fileUrls = dialog.getFileUrls();
if ( (fileUrls == null) || fileUrls.isEmpty() ) {
@@ -197,7 +199,6 @@
}
});
-
return actions;
}
@@ -223,6 +224,7 @@
dialog = new JDialog(MainFrame.getInstance(), "Populate from Twitter JSON", true);
MainFrame.getGuiRoots().add(dialog);
dialog.getContentPane().setLayout(new BoxLayout(dialog.getContentPane(), BoxLayout.Y_AXIS));
+ dialog.add(Box.createVerticalStrut(3));
Box encodingBox = Box.createHorizontalBox();
JLabel encodingLabel = new JLabel("Encoding:");
@@ -230,8 +232,10 @@
encodingBox.add(encodingLabel);
encodingBox.add(encodingField);
dialog.add(encodingBox);
+ dialog.add(Box.createVerticalStrut(4));
Box checkboxBox = Box.createHorizontalBox();
+ checkboxBox.setToolTipText("If unchecked, one document per file");
JLabel checkboxLabel = new JLabel("One document per tweet");
checkbox = new JCheckBox();
checkbox.setSelected(config.getOneDocCheckbox());
@@ -239,13 +243,34 @@
checkboxBox.add(Box.createHorizontalGlue());
checkboxBox.add(checkbox);
dialog.add(checkboxBox);
+ dialog.add(Box.createVerticalStrut(4));
contentKeysEditor = new ListEditor("Content keys: ", config.getContentKeys());
+ contentKeysEditor.setToolTipText("JSON key paths to be turned into DocumentContent");
dialog.add(contentKeysEditor);
+ dialog.add(Box.createVerticalStrut(4));
featureKeysEditor = new ListEditor("Feature keys: ", config.getFeatureKeys());
+ featureKeysEditor.setToolTipText("JSON key paths to be turned into Tweet annotation features");
dialog.add(featureKeysEditor);
+ dialog.add(Box.createVerticalStrut(6));
+ Box configPersistenceBox = Box.createHorizontalBox();
+ configPersistenceBox.add(Box.createHorizontalGlue());
+ JButton loadConfigButton = new JButton("Load configuration");
+ loadConfigButton.setToolTipText("Replace the configuration above with a previously saved one");
+ configPersistenceBox.add(loadConfigButton);
+ configPersistenceBox.add(Box.createHorizontalGlue());
+ JButton saveConfigButton = new JButton("Save configuration");
+ saveConfigButton.setToolTipText("Save the configuration above for re-use");
+ configPersistenceBox.add(saveConfigButton);
+ configPersistenceBox.add(Box.createHorizontalGlue());
+ //dialog.add(configPersistenceBox);
+ //dialog.add(Box.createVerticalStrut(5));
+
+ dialog.add(new JSeparator(SwingConstants.HORIZONTAL));
+ dialog.add(Box.createVerticalStrut(2));
+
chooser = new JFileChooser();
chooser.setFileSelectionMode(JFileChooser.FILES_ONLY);
chooser.setMultiSelectionEnabled(true);
@@ -350,6 +375,14 @@
private JLabel label;
private JTextField field;
+ @Override
+ public void setToolTipText(String text) {
+ super.setToolTipText(text);
+ label.setToolTipText(text);
+ field.setToolTipText(text);
+ }
+
+
public ListEditor(String labelString, List<String> initialValues) {
label = new JLabel(labelString);
field = new JTextField();
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|