GATE and UIMA GATE in Web Applications GATE and Groovy
Advanced GATE Embedded
Track II, Module 8 Second GATE Training Course May 2010
Advanced GATE Embedded 1 / 81
Advanced GATE Embedded Track II, Module 8 Second GATE Training - - PowerPoint PPT Presentation
GATE and UIMA GATE in Web Applications GATE and Groovy Advanced GATE Embedded Track II, Module 8 Second GATE Training Course May 2010 Advanced GATE Embedded 1 / 81 GATE and UIMA GATE in Web Applications GATE and Groovy Outline GATE and
GATE and UIMA GATE in Web Applications GATE and Groovy
Advanced GATE Embedded 1 / 81
GATE and UIMA GATE in Web Applications GATE and Groovy
Advanced GATE Embedded 2 / 81
GATE and UIMA GATE in Web Applications GATE and Groovy Introduction to UIMA UIMA and GATE compared Integrating GATE and UIMA
Advanced GATE Embedded 3 / 81
GATE and UIMA GATE in Web Applications GATE and Groovy Introduction to UIMA UIMA and GATE compared Integrating GATE and UIMA
Advanced GATE Embedded 4 / 81
GATE and UIMA GATE in Web Applications GATE and Groovy Introduction to UIMA UIMA and GATE compared Integrating GATE and UIMA
Advanced GATE Embedded 5 / 81
GATE and UIMA GATE in Web Applications GATE and Groovy Introduction to UIMA UIMA and GATE compared Integrating GATE and UIMA
Advanced GATE Embedded 6 / 81
GATE and UIMA GATE in Web Applications GATE and Groovy Introduction to UIMA UIMA and GATE compared Integrating GATE and UIMA
Advanced GATE Embedded 7 / 81
GATE and UIMA GATE in Web Applications GATE and Groovy Introduction to UIMA UIMA and GATE compared Integrating GATE and UIMA
Advanced GATE Embedded 8 / 81
GATE and UIMA GATE in Web Applications GATE and Groovy Introduction to UIMA UIMA and GATE compared Integrating GATE and UIMA
Advanced GATE Embedded 9 / 81
GATE and UIMA GATE in Web Applications GATE and Groovy Introduction to UIMA UIMA and GATE compared Integrating GATE and UIMA
Advanced GATE Embedded 10 / 81
GATE and UIMA GATE in Web Applications GATE and Groovy Introduction to UIMA UIMA and GATE compared Integrating GATE and UIMA
Advanced GATE Embedded 10 / 81
GATE and UIMA GATE in Web Applications GATE and Groovy Introduction to UIMA UIMA and GATE compared Integrating GATE and UIMA
Advanced GATE Embedded 10 / 81
GATE and UIMA GATE in Web Applications GATE and Groovy Introduction to UIMA UIMA and GATE compared Integrating GATE and UIMA
Advanced GATE Embedded 10 / 81
GATE and UIMA GATE in Web Applications GATE and Groovy Introduction to UIMA UIMA and GATE compared Integrating GATE and UIMA
Advanced GATE Embedded 11 / 81
GATE and UIMA GATE in Web Applications GATE and Groovy Introduction to UIMA UIMA and GATE compared Integrating GATE and UIMA
Advanced GATE Embedded 12 / 81
GATE and UIMA GATE in Web Applications GATE and Groovy Introduction to UIMA UIMA and GATE compared Integrating GATE and UIMA
Advanced GATE Embedded 12 / 81
GATE and UIMA GATE in Web Applications GATE and Groovy Introduction to UIMA UIMA and GATE compared Integrating GATE and UIMA
Advanced GATE Embedded 12 / 81
GATE and UIMA GATE in Web Applications GATE and Groovy Introduction to UIMA UIMA and GATE compared Integrating GATE and UIMA
Advanced GATE Embedded 12 / 81
GATE and UIMA GATE in Web Applications GATE and Groovy Introduction to UIMA UIMA and GATE compared Integrating GATE and UIMA
GoldfishCount = 1
Advanced GATE Embedded 12 / 81
GATE and UIMA GATE in Web Applications GATE and Groovy Introduction to UIMA UIMA and GATE compared Integrating GATE and UIMA
GoldfishCount = 1
Advanced GATE Embedded 12 / 81
GATE and UIMA GATE in Web Applications GATE and Groovy Introduction to UIMA UIMA and GATE compared Integrating GATE and UIMA
GoldfishCount = 1
numFish = 1
Advanced GATE Embedded 12 / 81
GATE and UIMA GATE in Web Applications GATE and Groovy Introduction to UIMA UIMA and GATE compared Integrating GATE and UIMA
GoldfishCount = 1 numFish = 1
Advanced GATE Embedded 12 / 81
GATE and UIMA GATE in Web Applications GATE and Groovy Introduction to UIMA UIMA and GATE compared Integrating GATE and UIMA
Advanced GATE Embedded 13 / 81
GATE and UIMA GATE in Web Applications GATE and Groovy Introduction to UIMA UIMA and GATE compared Integrating GATE and UIMA
Advanced GATE Embedded 13 / 81
GATE and UIMA GATE in Web Applications GATE and Groovy Introduction to UIMA UIMA and GATE compared Integrating GATE and UIMA
Advanced GATE Embedded 13 / 81
GATE and UIMA GATE in Web Applications GATE and Groovy Introduction to UIMA UIMA and GATE compared Integrating GATE and UIMA
Advanced GATE Embedded 13 / 81
GATE and UIMA GATE in Web Applications GATE and Groovy Introduction to UIMA UIMA and GATE compared Integrating GATE and UIMA
Advanced GATE Embedded 14 / 81
GATE and UIMA GATE in Web Applications GATE and Groovy Introduction to UIMA UIMA and GATE compared Integrating GATE and UIMA
Advanced GATE Embedded 14 / 81
GATE and UIMA GATE in Web Applications GATE and Groovy Introduction to UIMA UIMA and GATE compared Integrating GATE and UIMA
Advanced GATE Embedded 15 / 81
GATE and UIMA GATE in Web Applications GATE and Groovy Introduction to UIMA UIMA and GATE compared Integrating GATE and UIMA
Advanced GATE Embedded 15 / 81
GATE and UIMA GATE in Web Applications GATE and Groovy Introduction to UIMA UIMA and GATE compared Integrating GATE and UIMA
Advanced GATE Embedded 15 / 81
GATE and UIMA GATE in Web Applications GATE and Groovy Introduction to UIMA UIMA and GATE compared Integrating GATE and UIMA
Advanced GATE Embedded 15 / 81
GATE and UIMA GATE in Web Applications GATE and Groovy Introduction to UIMA UIMA and GATE compared Integrating GATE and UIMA
1 <CREOLE-DIRECTORY> 2
3
4 </CREOLE-DIRECTORY>
Advanced GATE Embedded 16 / 81
GATE and UIMA GATE in Web Applications GATE and Groovy Introduction to UIMA UIMA and GATE compared Integrating GATE and UIMA
Advanced GATE Embedded 17 / 81
GATE and UIMA GATE in Web Applications GATE and Groovy Introduction to UIMA UIMA and GATE compared Integrating GATE and UIMA
Advanced GATE Embedded 18 / 81
GATE and UIMA GATE in Web Applications GATE and Groovy Introduction to UIMA UIMA and GATE compared Integrating GATE and UIMA
Advanced GATE Embedded 19 / 81
GATE and UIMA GATE in Web Applications GATE and Groovy Introduction to UIMA UIMA and GATE compared Integrating GATE and UIMA
Advanced GATE Embedded 20 / 81
GATE and UIMA GATE in Web Applications GATE and Groovy Introduction to UIMA UIMA and GATE compared Integrating GATE and UIMA
Advanced GATE Embedded 21 / 81
GATE and UIMA GATE in Web Applications GATE and Groovy Introduction to UIMA UIMA and GATE compared Integrating GATE and UIMA
Advanced GATE Embedded 22 / 81
GATE and UIMA GATE in Web Applications GATE and Groovy Introduction to UIMA UIMA and GATE compared Integrating GATE and UIMA
Advanced GATE Embedded 23 / 81
GATE and UIMA GATE in Web Applications GATE and Groovy Introduction Multi-threading and GATE Servlet Example The Spring Framework
Advanced GATE Embedded 24 / 81
GATE and UIMA GATE in Web Applications GATE and Groovy Introduction Multi-threading and GATE Servlet Example The Spring Framework
Advanced GATE Embedded 25 / 81
GATE and UIMA GATE in Web Applications GATE and Groovy Introduction Multi-threading and GATE Servlet Example The Spring Framework
Advanced GATE Embedded 26 / 81
GATE and UIMA GATE in Web Applications GATE and Groovy Introduction Multi-threading and GATE Servlet Example The Spring Framework
Advanced GATE Embedded 27 / 81
GATE and UIMA GATE in Web Applications GATE and Groovy Introduction Multi-threading and GATE Servlet Example The Spring Framework
1 public void contextInitialized(ServletContextEvent e) { 2
3
4
5
6
7
8
9
10
11
12 } Advanced GATE Embedded 28 / 81
GATE and UIMA GATE in Web Applications GATE and Groovy Introduction Multi-threading and GATE Servlet Example The Spring Framework
1 <listener> 2
3
4
5 </listener> Advanced GATE Embedded 29 / 81
GATE and UIMA GATE in Web Applications GATE and Groovy Introduction Multi-threading and GATE Servlet Example The Spring Framework
1 public void doPost(request, response) { 2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 } Advanced GATE Embedded 30 / 81
GATE and UIMA GATE in Web Applications GATE and Groovy Introduction Multi-threading and GATE Servlet Example The Spring Framework
1 public void doPost(request, response) { 2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 } Advanced GATE Embedded 30 / 81
GATE and UIMA GATE in Web Applications GATE and Groovy Introduction Multi-threading and GATE Servlet Example The Spring Framework
Advanced GATE Embedded 31 / 81
GATE and UIMA GATE in Web Applications GATE and Groovy Introduction Multi-threading and GATE Servlet Example The Spring Framework
1 private ThreadLocal<CorpusController> controller = 2
3 4
5
6
7 }; 8 9 private CorpusController loadController() { ... } 10 11 public void doPost(request, response) { 12
13
14 } Advanced GATE Embedded 32 / 81
GATE and UIMA GATE in Web Applications GATE and Groovy Introduction Multi-threading and GATE Servlet Example The Spring Framework
Advanced GATE Embedded 33 / 81
GATE and UIMA GATE in Web Applications GATE and Groovy Introduction Multi-threading and GATE Servlet Example The Spring Framework
Advanced GATE Embedded 34 / 81
GATE and UIMA GATE in Web Applications GATE and Groovy Introduction Multi-threading and GATE Servlet Example The Spring Framework
1 private BlockingQueue<CorpusController> pool; 2 3 public void init() { 4
5
6
7
8 } 9 10 public void destroy() { 11
12
13
14 } Advanced GATE Embedded 35 / 81
GATE and UIMA GATE in Web Applications GATE and Groovy Introduction Multi-threading and GATE Servlet Example The Spring Framework
15 public void doPost(request, response) { 16
17
18
19
20
21
22
23 } Advanced GATE Embedded 36 / 81
GATE and UIMA GATE in Web Applications GATE and Groovy Introduction Multi-threading and GATE Servlet Example The Spring Framework
15 public void doPost(request, response) { 16
17
18
19
20
21
22
23 } Advanced GATE Embedded 36 / 81
GATE and UIMA GATE in Web Applications GATE and Groovy Introduction Multi-threading and GATE Servlet Example The Spring Framework
Advanced GATE Embedded 37 / 81
GATE and UIMA GATE in Web Applications GATE and Groovy Introduction Multi-threading and GATE Servlet Example The Spring Framework
Advanced GATE Embedded 38 / 81
GATE and UIMA GATE in Web Applications GATE and Groovy Introduction Multi-threading and GATE Servlet Example The Spring Framework
Advanced GATE Embedded 39 / 81
GATE and UIMA GATE in Web Applications GATE and Groovy Introduction Multi-threading and GATE Servlet Example The Spring Framework
Advanced GATE Embedded 40 / 81
GATE and UIMA GATE in Web Applications GATE and Groovy Introduction Multi-threading and GATE Servlet Example The Spring Framework
1 <beans 2
3
4
5
6
7
8
9
10
11
12 </beans> Advanced GATE Embedded 41 / 81
GATE and UIMA GATE in Web Applications GATE and Groovy Introduction Multi-threading and GATE Servlet Example The Spring Framework
1 <gate:saved-application 2
3
4
Advanced GATE Embedded 42 / 81
GATE and UIMA GATE in Web Applications GATE and Groovy Introduction Multi-threading and GATE Servlet Example The Spring Framework
1 <gate:duplicate id="myApp" return-template="true"> 2
3 </gate:duplicate>
Advanced GATE Embedded 43 / 81
GATE and UIMA GATE in Web Applications GATE and Groovy Introduction Multi-threading and GATE Servlet Example The Spring Framework
1 public class MyHandler 2
3
4
5
6 7
8
9
10
11
Advanced GATE Embedded 44 / 81
GATE and UIMA GATE in Web Applications GATE and Groovy Introduction Multi-threading and GATE Servlet Example The Spring Framework
13
14
15
16
17
18
19
20
21
22
23 } Advanced GATE Embedded 45 / 81
GATE and UIMA GATE in Web Applications GATE and Groovy Introduction Multi-threading and GATE Servlet Example The Spring Framework
1 <gate:init ... /> 2 <gate:duplicate id="myApp" return-template="true"> 3
4
5 </gate:duplicate> 6 7 <!−− D e f i n e
8 <bean id="mainHandler" 9
10
11
12
13
14 </bean> Advanced GATE Embedded 46 / 81
GATE and UIMA GATE in Web Applications GATE and Groovy Introduction Multi-threading and GATE Servlet Example The Spring Framework
12
13
Advanced GATE Embedded 47 / 81
GATE and UIMA GATE in Web Applications GATE and Groovy Introduction Multi-threading and GATE Servlet Example The Spring Framework
1 <gate:pooled-proxy 2
3
4
5
6
7 />
Advanced GATE Embedded 48 / 81
GATE and UIMA GATE in Web Applications GATE and Groovy Introduction Multi-threading and GATE Servlet Example The Spring Framework
1 <listener> 2
3
4
5 </listener> Advanced GATE Embedded 49 / 81
GATE and UIMA GATE in Web Applications GATE and Groovy Introduction Multi-threading and GATE Servlet Example The Spring Framework
7 <servlet> 8
9
10
11
12 </servlet> Advanced GATE Embedded 50 / 81
GATE and UIMA GATE in Web Applications GATE and Groovy Introduction Multi-threading and GATE Servlet Example The Spring Framework
Advanced GATE Embedded 51 / 81
GATE and UIMA GATE in Web Applications GATE and Groovy Introduction Multi-threading and GATE Servlet Example The Spring Framework
Advanced GATE Embedded 52 / 81
GATE and UIMA GATE in Web Applications GATE and Groovy Introduction Multi-threading and GATE Servlet Example The Spring Framework
Advanced GATE Embedded 53 / 81
GATE and UIMA GATE in Web Applications GATE and Groovy Introduction Multi-threading and GATE Servlet Example The Spring Framework
Advanced GATE Embedded 54 / 81
GATE and UIMA GATE in Web Applications GATE and Groovy Introduction Multi-threading and GATE Servlet Example The Spring Framework
1
2 ApplicationContext ctx = 3
4 5 DocumentProcessor proc = ctx.getBean( 6
7 8
9 proc.processDocument(myDocument); Advanced GATE Embedded 55 / 81
GATE and UIMA GATE in Web Applications GATE and Groovy Introduction Multi-threading and GATE Servlet Example The Spring Framework
1 <gate:init ... /> 2 <gate:duplicate id="myApp"> 3
4
5 </gate:duplicate> 6 7 <!−− D e f i n e
8 <bean id="documentProcessor" 9
10
11
12
13 </bean> Advanced GATE Embedded 56 / 81
GATE and UIMA GATE in Web Applications GATE and Groovy Introduction Multi-threading and GATE Servlet Example The Spring Framework
Advanced GATE Embedded 57 / 81
GATE and UIMA GATE in Web Applications GATE and Groovy Introduction to Groovy Scripting GATE Developer The Groovy Script PR Writing GATE Resource Classes in Groovy
Advanced GATE Embedded 58 / 81
GATE and UIMA GATE in Web Applications GATE and Groovy Introduction to Groovy Scripting GATE Developer The Groovy Script PR Writing GATE Resource Classes in Groovy
Advanced GATE Embedded 59 / 81
GATE and UIMA GATE in Web Applications GATE and Groovy Introduction to Groovy Scripting GATE Developer The Groovy Script PR Writing GATE Resource Classes in Groovy
1 def om = document.getAnnotations("Original markups") 2 om.get(’a’).findAll { anchor -> 3
4 }.collect { it.startNode.offset } Advanced GATE Embedded 60 / 81
GATE and UIMA GATE in Web Applications GATE and Groovy Introduction to Groovy Scripting GATE Developer The Groovy Script PR Writing GATE Resource Classes in Groovy
1 def om = document.getAnnotations("Original markups") 2 om.get(’a’).findAll { anchor -> 3
4 }.collect { it.startNode.offset }
Advanced GATE Embedded 60 / 81
GATE and UIMA GATE in Web Applications GATE and Groovy Introduction to Groovy Scripting GATE Developer The Groovy Script PR Writing GATE Resource Classes in Groovy
1 def om = document.getAnnotations("Original markups") 2 om.get(’a’).findAll { anchor -> 3
4 }.collect { it.startNode.offset }
Advanced GATE Embedded 60 / 81
GATE and UIMA GATE in Web Applications GATE and Groovy Introduction to Groovy Scripting GATE Developer The Groovy Script PR Writing GATE Resource Classes in Groovy
1 def om = document.getAnnotations("Original markups") 2 om.get(’a’).findAll { anchor -> 3
4 }.collect { it.startNode.offset }
Advanced GATE Embedded 60 / 81
GATE and UIMA GATE in Web Applications GATE and Groovy Introduction to Groovy Scripting GATE Developer The Groovy Script PR Writing GATE Resource Classes in Groovy
1 def om = document.getAnnotations("Original markups") 2 om.get(’a’).findAll { anchor -> 3
4 }.collect { it.startNode.offset }
Advanced GATE Embedded 60 / 81
GATE and UIMA GATE in Web Applications GATE and Groovy Introduction to Groovy Scripting GATE Developer The Groovy Script PR Writing GATE Resource Classes in Groovy
1 def om = document.getAnnotations("Original markups") 2 om.get(’a’).findAll { anchor -> 3
4 }.collect { it.startNode.offset }
Advanced GATE Embedded 60 / 81
GATE and UIMA GATE in Web Applications GATE and Groovy Introduction to Groovy Scripting GATE Developer The Groovy Script PR Writing GATE Resource Classes in Groovy
1 def om = document.getAnnotations("Original markups") 2 om.get(’a’).findAll { anchor -> 3
4 }.collect { it.startNode.offset } Advanced GATE Embedded 61 / 81
GATE and UIMA GATE in Web Applications GATE and Groovy Introduction to Groovy Scripting GATE Developer The Groovy Script PR Writing GATE Resource Classes in Groovy
1 def om = document.getAnnotations("Original markups") 2 om.get(’a’).findAll { anchor -> 3
4 }.collect { it.startNode.offset }
Advanced GATE Embedded 61 / 81
GATE and UIMA GATE in Web Applications GATE and Groovy Introduction to Groovy Scripting GATE Developer The Groovy Script PR Writing GATE Resource Classes in Groovy
1 def om = document.getAnnotations("Original markups") 2 om.get(’a’).findAll { anchor -> 3
4 }.collect { it.startNode.offset }
Advanced GATE Embedded 61 / 81
GATE and UIMA GATE in Web Applications GATE and Groovy Introduction to Groovy Scripting GATE Developer The Groovy Script PR Writing GATE Resource Classes in Groovy
1 def om = document.getAnnotations("Original markups") 2 om.get(’a’).findAll { anchor -> 3
4 }.collect { it.startNode.offset }
Advanced GATE Embedded 61 / 81
GATE and UIMA GATE in Web Applications GATE and Groovy Introduction to Groovy Scripting GATE Developer The Groovy Script PR Writing GATE Resource Classes in Groovy
1 def om = document.getAnnotations("Original markups") 2 om.get(’a’).findAll { anchor -> 3
4 }.collect { it.startNode.offset }
Advanced GATE Embedded 61 / 81
GATE and UIMA GATE in Web Applications GATE and Groovy Introduction to Groovy Scripting GATE Developer The Groovy Script PR Writing GATE Resource Classes in Groovy
Advanced GATE Embedded 62 / 81
GATE and UIMA GATE in Web Applications GATE and Groovy Introduction to Groovy Scripting GATE Developer The Groovy Script PR Writing GATE Resource Classes in Groovy
Advanced GATE Embedded 63 / 81
GATE and UIMA GATE in Web Applications GATE and Groovy Introduction to Groovy Scripting GATE Developer The Groovy Script PR Writing GATE Resource Classes in Groovy
Advanced GATE Embedded 64 / 81
GATE and UIMA GATE in Web Applications GATE and Groovy Introduction to Groovy Scripting GATE Developer The Groovy Script PR Writing GATE Resource Classes in Groovy
Advanced GATE Embedded 65 / 81
GATE and UIMA GATE in Web Applications GATE and Groovy Introduction to Groovy Scripting GATE Developer The Groovy Script PR Writing GATE Resource Classes in Groovy
Advanced GATE Embedded 66 / 81
GATE and UIMA GATE in Web Applications GATE and Groovy Introduction to Groovy Scripting GATE Developer The Groovy Script PR Writing GATE Resource Classes in Groovy
Advanced GATE Embedded 67 / 81
GATE and UIMA GATE in Web Applications GATE and Groovy Introduction to Groovy Scripting GATE Developer The Groovy Script PR Writing GATE Resource Classes in Groovy
1 doc = Factory.newDocument(new URL(’http://gate.ac.uk’)) 2 tokeniser = Factory.createResource(’gate.creole.tokeniser.
3 tokeniser.document = doc 4 tokeniser.execute() 5 tokens = doc.annotations.get(’Token’) 6 tokens.findAll { it.features.kind == ’number’ }.size() Advanced GATE Embedded 68 / 81
GATE and UIMA GATE in Web Applications GATE and Groovy Introduction to Groovy Scripting GATE Developer The Groovy Script PR Writing GATE Resource Classes in Groovy
Advanced GATE Embedded 69 / 81
GATE and UIMA GATE in Web Applications GATE and Groovy Introduction to Groovy Scripting GATE Developer The Groovy Script PR Writing GATE Resource Classes in Groovy
1
2 doc.namedAnnotationSets.each { name, set -> 3
4 } 5 6
7 tokens.collect { it.features.kind }.unique() 8 9
10 tokens.findAll { 11
12 }.max { it.features.length.toInteger() } Advanced GATE Embedded
GATE and UIMA GATE in Web Applications GATE and Groovy Introduction to Groovy Scripting GATE Developer The Groovy Script PR Writing GATE Resource Classes in Groovy
Advanced GATE Embedded 70 / 81
GATE and UIMA GATE in Web Applications GATE and Groovy Introduction to Groovy Scripting GATE Developer The Groovy Script PR Writing GATE Resource Classes in Groovy
1 tokens.findAll { 2
3 }.each { 4
5
6 } Advanced GATE Embedded 71 / 81
GATE and UIMA GATE in Web Applications GATE and Groovy Introduction to Groovy Scripting GATE Developer The Groovy Script PR Writing GATE Resource Classes in Groovy
1 Factory.newDocument(someURL).withResource { doc -> 2
3 } Advanced GATE Embedded 72 / 81
GATE and UIMA GATE in Web Applications GATE and Groovy Introduction to Groovy Scripting GATE Developer The Groovy Script PR Writing GATE Resource Classes in Groovy
Advanced GATE Embedded 73 / 81
GATE and UIMA GATE in Web Applications GATE and Groovy Introduction to Groovy Scripting GATE Developer The Groovy Script PR Writing GATE Resource Classes in Groovy
1 tokens = doc.annotations["Token"] 2 tokens.findAll { 3
4 }.each { 5
6
7 } Advanced GATE Embedded 74 / 81
GATE and UIMA GATE in Web Applications GATE and Groovy Introduction to Groovy Scripting GATE Developer The Groovy Script PR Writing GATE Resource Classes in Groovy
Advanced GATE Embedded 75 / 81
GATE and UIMA GATE in Web Applications GATE and Groovy Introduction to Groovy Scripting GATE Developer The Groovy Script PR Writing GATE Resource Classes in Groovy
Advanced GATE Embedded 76 / 81
GATE and UIMA GATE in Web Applications GATE and Groovy Introduction to Groovy Scripting GATE Developer The Groovy Script PR Writing GATE Resource Classes in Groovy
Advanced GATE Embedded 77 / 81
GATE and UIMA GATE in Web Applications GATE and Groovy Introduction to Groovy Scripting GATE Developer The Groovy Script PR Writing GATE Resource Classes in Groovy
1 def m = (content =~ /(?i)goldfish/) 2 while(m.find()) { 3
4
5 } 6 7 def allGoldfish = outputAS["Goldfish"] 8 inputAS["Sentence"].each { sent -> 9
10
11 } Advanced GATE Embedded
GATE and UIMA GATE in Web Applications GATE and Groovy Introduction to Groovy Scripting GATE Developer The Groovy Script PR Writing GATE Resource Classes in Groovy
Advanced GATE Embedded 78 / 81
GATE and UIMA GATE in Web Applications GATE and Groovy Introduction to Groovy Scripting GATE Developer The Groovy Script PR Writing GATE Resource Classes in Groovy
Advanced GATE Embedded 79 / 81
GATE and UIMA GATE in Web Applications GATE and Groovy Introduction to Groovy Scripting GATE Developer The Groovy Script PR Writing GATE Resource Classes in Groovy
1 package gate.groovy.example 2 3 import gate.* 4 import gate.creole.* 5 6 public class RegexPR extends AbstractLanguageAnalyser { 7
8
9
10 11
12
13
14
15
16
17
18
19 } Advanced GATE Embedded 80 / 81
GATE and UIMA GATE in Web Applications GATE and Groovy Introduction to Groovy Scripting GATE Developer The Groovy Script PR Writing GATE Resource Classes in Groovy
Advanced GATE Embedded 81 / 81