Revision: 17301
          http://sourceforge.net/p/gate/code/17301
Author:   adamfunk
Date:     2014-02-13 16:39:11 +0000 (Thu, 13 Feb 2014)
Log Message:
-----------
PMI example application

Added Paths:
-----------
    gate/trunk/plugins/TermRaider/applications/pmi-entity-vp.gapp
    gate/trunk/plugins/TermRaider/resources/groovy/CleanPMICandidates.groovy
    gate/trunk/plugins/TermRaider/resources/jape/named_entities.jape
    gate/trunk/plugins/TermRaider/resources/jape/nouns-for-pmi.jape
    gate/trunk/plugins/TermRaider/resources/jape/nouns-verbs-for-pmi.jape

Added: gate/trunk/plugins/TermRaider/applications/pmi-entity-vp.gapp
===================================================================
--- gate/trunk/plugins/TermRaider/applications/pmi-entity-vp.gapp               
                (rev 0)
+++ gate/trunk/plugins/TermRaider/applications/pmi-entity-vp.gapp       
2014-02-13 16:39:11 UTC (rev 17301)
@@ -0,0 +1,935 @@
+<gate.util.persistence.GateApplication>
+  <urlList class="gate.util.persistence.CollectionPersistence">
+    <localList>
+      <gate.util.persistence.PersistenceManager-URLHolder>
+        <urlString>$relpath$../../Tools/</urlString>
+      </gate.util.persistence.PersistenceManager-URLHolder>
+      <gate.util.persistence.PersistenceManager-URLHolder>
+        <urlString>$relpath$../../ANNIE/</urlString>
+      </gate.util.persistence.PersistenceManager-URLHolder>
+      <gate.util.persistence.PersistenceManager-URLHolder>
+        <urlString>$relpath$../../Groovy/</urlString>
+      </gate.util.persistence.PersistenceManager-URLHolder>
+      <gate.util.persistence.PersistenceManager-URLHolder>
+        <urlString>$relpath$../../TermRaider/</urlString>
+      </gate.util.persistence.PersistenceManager-URLHolder>
+      <gate.util.persistence.PersistenceManager-URLHolder>
+        <urlString>$relpath$../../Tagger_NP_Chunking/</urlString>
+      </gate.util.persistence.PersistenceManager-URLHolder>
+    </localList>
+    <collectionType>java.util.ArrayList</collectionType>
+  </urlList>
+  <application class="gate.groovy.ScriptableControllerPersistence">
+    <controlScript class="string">import gate.termraider.*;
+
+// equivalent to old preprocessor
+eachDocument {
+    docReset()
+    AnnieGazetteer()
+    tokenizer()
+    splitter()
+    posTagger()
+    lemmatizer()
+    
+    AnnieNeTransducer()
+    OrthoMatcher()
+    tokenCanonical()
+    multiword()
+    vpChunker()
+    pmiCandidates()
+    cleanCandidates()
+    namedEntities()
+}
+
+
+// create the PMIBank LRs
+String pmiBankName = &quot;gate.termraider.bank.PMIBank&quot;;
+FeatureMap parameters0 = Factory.newFeatureMap();
+Set&lt;Corpus&gt; corporaSL = Collections.singleton(corpus);
+types = [&quot;Entity&quot;, &quot;Verb&quot;, &quot;VG&quot;];
+parameters0.put(&quot;corpora&quot;, corporaSL);
+parameters0.put(&quot;innerAnnotationTypes&quot;, types);
+parameters0.put(&quot;inputAnnotationFeature&quot;, &quot;canonical&quot;);
+parameters0.put(&quot;debugMode&quot;, true);
+LanguageResource termbank0 = (LanguageResource) 
Factory.createResource(pmiBankName, parameters0);
+
+FeatureMap parameters1 = Factory.newFeatureMap();
+parameters1.putAll(parameters0);
+parameters1.put(&quot;requireTypeDifference&quot;, true);
+LanguageResource termbank1 = (LanguageResource) 
Factory.createResource(pmiBankName, parameters1);
+</controlScript>
+    <prList class="gate.util.persistence.CollectionPersistence">
+      <localList>
+        <gate.util.persistence.PRPersistence>
+          <runtimeParams class="gate.util.persistence.MapPersistence">
+            <mapType>gate.util.SimpleFeatureMapImpl</mapType>
+            <localMap>
+              <entry>
+                <string>setsToKeep</string>
+                <gate.util.persistence.CollectionPersistence>
+                  <localList>
+                    <string>Key</string>
+                  </localList>
+                  <collectionType>java.util.ArrayList</collectionType>
+                </gate.util.persistence.CollectionPersistence>
+              </entry>
+              <entry>
+                <string>document</string>
+                <null/>
+              </entry>
+              <entry>
+                <string>annotationTypes</string>
+                <null/>
+              </entry>
+              <entry>
+                <string>corpus</string>
+                <null/>
+              </entry>
+              <entry>
+                <string>setsToRemove</string>
+                <null/>
+              </entry>
+              <entry>
+                <string>keepOriginalMarkupsAS</string>
+                <boolean>true</boolean>
+              </entry>
+            </localMap>
+          </runtimeParams>
+          
<resourceType>gate.creole.annotdelete.AnnotationDeletePR</resourceType>
+          <resourceName>docReset</resourceName>
+          <initParams class="gate.util.persistence.MapPersistence">
+            <mapType>gate.util.SimpleFeatureMapImpl</mapType>
+            <localMap/>
+          </initParams>
+          <features class="gate.util.persistence.MapPersistence">
+            <mapType>gate.util.SimpleFeatureMapImpl</mapType>
+            <localMap>
+              <entry>
+                <string>%@helpURL</string>
+                
<string>http://gate.ac.uk/userguide/sec:misc-creole:reset</string>
+              </entry>
+            </localMap>
+          </features>
+        </gate.util.persistence.PRPersistence>
+        <gate.util.persistence.LanguageAnalyserPersistence>
+          <runtimeParams class="gate.util.persistence.MapPersistence">
+            <mapType>gate.util.SimpleFeatureMapImpl</mapType>
+            <localMap>
+              <entry>
+                <string>wholeWordsOnly</string>
+                <boolean>true</boolean>
+              </entry>
+              <entry>
+                <string>longestMatchOnly</string>
+                <boolean>true</boolean>
+              </entry>
+              <entry>
+                <string>document</string>
+                <null/>
+              </entry>
+              <entry>
+                <string>corpus</string>
+                <null/>
+              </entry>
+              <entry>
+                <string>annotationSetName</string>
+                <string></string>
+              </entry>
+            </localMap>
+          </runtimeParams>
+          <resourceType>gate.creole.gazetteer.DefaultGazetteer</resourceType>
+          <resourceName>AnnieGazetteer</resourceName>
+          <initParams class="gate.util.persistence.MapPersistence">
+            <mapType>gate.util.SimpleFeatureMapImpl</mapType>
+            <localMap>
+              <entry>
+                <string>listsURL</string>
+                <gate.util.persistence.PersistenceManager-URLHolder>
+                  
<urlString>$relpath$../../ANNIE/resources/gazetteer/lists.def</urlString>
+                </gate.util.persistence.PersistenceManager-URLHolder>
+              </entry>
+              <entry>
+                <string>encoding</string>
+                <string>UTF-8</string>
+              </entry>
+              <entry>
+                <string>gazetteerFeatureSeparator</string>
+                <string>:</string>
+              </entry>
+              <entry>
+                <string>caseSensitive</string>
+                <boolean>true</boolean>
+              </entry>
+            </localMap>
+          </initParams>
+          <features class="gate.util.persistence.MapPersistence">
+            <mapType>gate.util.SimpleFeatureMapImpl</mapType>
+            <localMap>
+              <entry>
+                <string>%@helpURL</string>
+                
<string>http://gate.ac.uk/userguide/sec:annie:gazetteer</string>
+              </entry>
+            </localMap>
+          </features>
+        </gate.util.persistence.LanguageAnalyserPersistence>
+        <gate.util.persistence.LanguageAnalyserPersistence>
+          <runtimeParams class="gate.util.persistence.MapPersistence">
+            <mapType>gate.util.SimpleFeatureMapImpl</mapType>
+            <localMap>
+              <entry>
+                <string>annotationSetName</string>
+                <string></string>
+              </entry>
+              <entry>
+                <string>document</string>
+                <null/>
+              </entry>
+              <entry>
+                <string>corpus</string>
+                <null/>
+              </entry>
+            </localMap>
+          </runtimeParams>
+          <resourceType>gate.creole.tokeniser.SimpleTokeniser</resourceType>
+          <resourceName>tokenizer</resourceName>
+          <initParams class="gate.util.persistence.MapPersistence">
+            <mapType>gate.util.SimpleFeatureMapImpl</mapType>
+            <localMap>
+              <entry>
+                <string>rulesURL</string>
+                <gate.util.persistence.PersistenceManager-URLHolder>
+                  
<urlString>$relpath$../../ANNIE/resources/tokeniser/DefaultTokeniser.rules</urlString>
+                </gate.util.persistence.PersistenceManager-URLHolder>
+              </entry>
+              <entry>
+                <string>encoding</string>
+                <string>UTF-8</string>
+              </entry>
+            </localMap>
+          </initParams>
+          <features class="gate.util.persistence.MapPersistence">
+            <mapType>gate.util.SimpleFeatureMapImpl</mapType>
+            <localMap>
+              <entry>
+                <string>%@helpURL</string>
+                
<string>http://gate.ac.uk/userguide/sec:annie:tokeniser</string>
+              </entry>
+            </localMap>
+          </features>
+        </gate.util.persistence.LanguageAnalyserPersistence>
+        <gate.util.persistence.LanguageAnalyserPersistence>
+          <runtimeParams class="gate.util.persistence.MapPersistence">
+            <mapType>gate.util.SimpleFeatureMapImpl</mapType>
+            <localMap>
+              <entry>
+                <string>outputASName</string>
+                <string></string>
+              </entry>
+              <entry>
+                <string>document</string>
+                <null/>
+              </entry>
+              <entry>
+                <string>corpus</string>
+                <null/>
+              </entry>
+              <entry>
+                <string>inputASName</string>
+                <string></string>
+              </entry>
+            </localMap>
+          </runtimeParams>
+          <resourceType>gate.creole.splitter.SentenceSplitter</resourceType>
+          <resourceName>splitter</resourceName>
+          <initParams class="gate.util.persistence.MapPersistence">
+            <mapType>gate.util.SimpleFeatureMapImpl</mapType>
+            <localMap>
+              <entry>
+                <string>encoding</string>
+                <string>UTF-8</string>
+              </entry>
+              <entry>
+                <string>gazetteerListsURL</string>
+                <gate.util.persistence.PersistenceManager-URLHolder>
+                  
<urlString>$relpath$../../ANNIE/resources/sentenceSplitter/gazetteer/lists.def</urlString>
+                </gate.util.persistence.PersistenceManager-URLHolder>
+              </entry>
+              <entry>
+                <string>transducerURL</string>
+                <gate.util.persistence.PersistenceManager-URLHolder>
+                  
<urlString>$relpath$../../ANNIE/resources/sentenceSplitter/grammar/main-single-nl.jape</urlString>
+                </gate.util.persistence.PersistenceManager-URLHolder>
+              </entry>
+            </localMap>
+          </initParams>
+          <features class="gate.util.persistence.MapPersistence">
+            <mapType>gate.util.SimpleFeatureMapImpl</mapType>
+            <localMap>
+              <entry>
+                <string>%@helpURL</string>
+                <string>http://gate.ac.uk/userguide/sec:annie:splitter</string>
+              </entry>
+            </localMap>
+          </features>
+        </gate.util.persistence.LanguageAnalyserPersistence>
+        <gate.util.persistence.LanguageAnalyserPersistence>
+          <runtimeParams class="gate.util.persistence.MapPersistence">
+            <mapType>gate.util.SimpleFeatureMapImpl</mapType>
+            <localMap>
+              <entry>
+                <string>document</string>
+                <null/>
+              </entry>
+              <entry>
+                <string>corpus</string>
+                <null/>
+              </entry>
+              <entry>
+                <string>outputAnnotationType</string>
+                <string>Token</string>
+              </entry>
+              <entry>
+                <string>failOnMissingInputAnnotations</string>
+                <boolean>false</boolean>
+              </entry>
+              <entry>
+                <string>inputASName</string>
+                <null/>
+              </entry>
+              <entry>
+                <string>outputASName</string>
+                <null/>
+              </entry>
+              <entry>
+                <string>baseSentenceAnnotationType</string>
+                <string>Sentence</string>
+              </entry>
+              <entry>
+                <string>posTagAllTokens</string>
+                <boolean>true</boolean>
+              </entry>
+              <entry>
+                <string>baseTokenAnnotationType</string>
+                <string>Token</string>
+              </entry>
+            </localMap>
+          </runtimeParams>
+          <resourceType>gate.creole.POSTagger</resourceType>
+          <resourceName>posTagger</resourceName>
+          <initParams class="gate.util.persistence.MapPersistence">
+            <mapType>gate.util.SimpleFeatureMapImpl</mapType>
+            <localMap>
+              <entry>
+                <string>rulesURL</string>
+                <gate.util.persistence.PersistenceManager-URLHolder>
+                  
<urlString>$relpath$../../ANNIE/resources/heptag/ruleset</urlString>
+                </gate.util.persistence.PersistenceManager-URLHolder>
+              </entry>
+              <entry>
+                <string>encoding</string>
+                <null/>
+              </entry>
+              <entry>
+                <string>lexiconURL</string>
+                <gate.util.persistence.PersistenceManager-URLHolder>
+                  
<urlString>$relpath$../../ANNIE/resources/heptag/lexicon</urlString>
+                </gate.util.persistence.PersistenceManager-URLHolder>
+              </entry>
+            </localMap>
+          </initParams>
+          <features class="gate.util.persistence.MapPersistence">
+            <mapType>gate.util.SimpleFeatureMapImpl</mapType>
+            <localMap>
+              <entry>
+                <string>%@helpURL</string>
+                <string>http://gate.ac.uk/userguide/sec:annie:tagger</string>
+              </entry>
+            </localMap>
+          </features>
+        </gate.util.persistence.LanguageAnalyserPersistence>
+        <gate.util.persistence.PRPersistence>
+          <runtimeParams class="gate.util.persistence.MapPersistence">
+            <mapType>gate.util.SimpleFeatureMapImpl</mapType>
+            <localMap>
+              <entry>
+                <string>document</string>
+                <null/>
+              </entry>
+              <entry>
+                <string>considerPOSTag</string>
+                <boolean>true</boolean>
+              </entry>
+              <entry>
+                <string>corpus</string>
+                <null/>
+              </entry>
+              <entry>
+                <string>rootFeatureName</string>
+                <string>root</string>
+              </entry>
+              <entry>
+                <string>annotationSetName</string>
+                <null/>
+              </entry>
+              <entry>
+                <string>failOnMissingInputAnnotations</string>
+                <boolean>false</boolean>
+              </entry>
+              <entry>
+                <string>affixFeatureName</string>
+                <string>affix</string>
+              </entry>
+            </localMap>
+          </runtimeParams>
+          <resourceType>gate.creole.morph.Morph</resourceType>
+          <resourceName>lemmatizer</resourceName>
+          <initParams class="gate.util.persistence.MapPersistence">
+            <mapType>gate.util.SimpleFeatureMapImpl</mapType>
+            <localMap>
+              <entry>
+                <string>caseSensitive</string>
+                <boolean>false</boolean>
+              </entry>
+              <entry>
+                <string>rulesFile</string>
+                <gate.util.persistence.PersistenceManager-URLHolder>
+                  
<urlString>$relpath$../../Tools/resources/morph/default.rul</urlString>
+                </gate.util.persistence.PersistenceManager-URLHolder>
+              </entry>
+            </localMap>
+          </initParams>
+          <features class="gate.util.persistence.MapPersistence">
+            <mapType>gate.util.SimpleFeatureMapImpl</mapType>
+            <localMap>
+              <entry>
+                <string>%@helpURL</string>
+                
<string>http://gate.ac.uk/userguide/sec:parsers:morpher</string>
+              </entry>
+            </localMap>
+          </features>
+        </gate.util.persistence.PRPersistence>
+        <gate.util.persistence.LanguageAnalyserPersistence>
+          <runtimeParams class="gate.util.persistence.MapPersistence">
+            <mapType>gate.util.SimpleFeatureMapImpl</mapType>
+            <localMap>
+              <entry>
+                <string>outputASName</string>
+                <null/>
+              </entry>
+              <entry>
+                <string>document</string>
+                <null/>
+              </entry>
+              <entry>
+                <string>corpus</string>
+                <null/>
+              </entry>
+              <entry>
+                <string>inputASName</string>
+                <null/>
+              </entry>
+            </localMap>
+          </runtimeParams>
+          <resourceType>gate.creole.ANNIETransducer</resourceType>
+          <resourceName>AnnieNeTransducer</resourceName>
+          <initParams class="gate.util.persistence.MapPersistence">
+            <mapType>gate.util.SimpleFeatureMapImpl</mapType>
+            <localMap>
+              <entry>
+                <string>encoding</string>
+                <string>UTF-8</string>
+              </entry>
+              <entry>
+                <string>grammarURL</string>
+                <gate.util.persistence.PersistenceManager-URLHolder>
+                  
<urlString>$relpath$../../ANNIE/resources/NE/main.jape</urlString>
+                </gate.util.persistence.PersistenceManager-URLHolder>
+              </entry>
+              <entry>
+                <string>annotationAccessors</string>
+                <null/>
+              </entry>
+              <entry>
+                <string>operators</string>
+                <null/>
+              </entry>
+            </localMap>
+          </initParams>
+          <features class="gate.util.persistence.MapPersistence">
+            <mapType>gate.util.SimpleFeatureMapImpl</mapType>
+            <localMap>
+              <entry>
+                <string>%@helpURL</string>
+                
<string>http://gate.ac.uk/userguide/sec:annie:semantic-tagger</string>
+              </entry>
+            </localMap>
+          </features>
+        </gate.util.persistence.LanguageAnalyserPersistence>
+        <gate.util.persistence.LanguageAnalyserPersistence>
+          <runtimeParams class="gate.util.persistence.MapPersistence">
+            <mapType>gate.util.SimpleFeatureMapImpl</mapType>
+            <localMap>
+              <entry>
+                <string>document</string>
+                <null/>
+              </entry>
+              <entry>
+                <string>annotationTypes</string>
+                <gate.util.persistence.CollectionPersistence>
+                  <localList>
+                    <string>Organization</string>
+                    <string>Person</string>
+                    <string>Location</string>
+                    <string>Date</string>
+                  </localList>
+                  <collectionType>java.util.ArrayList</collectionType>
+                </gate.util.persistence.CollectionPersistence>
+              </entry>
+              <entry>
+                <string>corpus</string>
+                <null/>
+              </entry>
+              <entry>
+                <string>annotationSetName</string>
+                <null/>
+              </entry>
+            </localMap>
+          </runtimeParams>
+          <resourceType>gate.creole.orthomatcher.OrthoMatcher</resourceType>
+          <resourceName>OrthoMatcher</resourceName>
+          <initParams class="gate.util.persistence.MapPersistence">
+            <mapType>gate.util.SimpleFeatureMapImpl</mapType>
+            <localMap>
+              <entry>
+                <string>definitionFileURL</string>
+                <gate.util.persistence.PersistenceManager-URLHolder>
+                  
<urlString>$relpath$../../ANNIE/resources/othomatcher/listsNM.def</urlString>
+                </gate.util.persistence.PersistenceManager-URLHolder>
+              </entry>
+              <entry>
+                <string>minimumNicknameLikelihood</string>
+                <double>0.5</double>
+              </entry>
+              <entry>
+                <string>extLists</string>
+                <boolean>true</boolean>
+              </entry>
+              <entry>
+                <string>caseSensitive</string>
+                <boolean>false</boolean>
+              </entry>
+              <entry>
+                <string>encoding</string>
+                <string>UTF-8</string>
+              </entry>
+              <entry>
+                <string>highPrecisionOrgs</string>
+                <boolean>false</boolean>
+              </entry>
+              <entry>
+                <string>personType</string>
+                <string>Person</string>
+              </entry>
+              <entry>
+                <string>processUnknown</string>
+                <boolean>false</boolean>
+              </entry>
+              <entry>
+                <string>organizationType</string>
+                <string>Organization</string>
+              </entry>
+            </localMap>
+          </initParams>
+          <features class="gate.util.persistence.MapPersistence">
+            <mapType>gate.util.SimpleFeatureMapImpl</mapType>
+            <localMap/>
+          </features>
+        </gate.util.persistence.LanguageAnalyserPersistence>
+        <gate.util.persistence.LanguageAnalyserPersistence>
+          <runtimeParams class="gate.util.persistence.MapPersistence">
+            <mapType>gate.util.SimpleFeatureMapImpl</mapType>
+            <localMap>
+              <entry>
+                <string>outputASName</string>
+                <null/>
+              </entry>
+              <entry>
+                <string>document</string>
+                <null/>
+              </entry>
+              <entry>
+                <string>corpus</string>
+                <null/>
+              </entry>
+              <entry>
+                <string>inputASName</string>
+                <null/>
+              </entry>
+            </localMap>
+          </runtimeParams>
+          <resourceType>gate.creole.ANNIETransducer</resourceType>
+          <resourceName>tokenCanonical</resourceName>
+          <initParams class="gate.util.persistence.MapPersistence">
+            <mapType>gate.util.SimpleFeatureMapImpl</mapType>
+            <localMap>
+              <entry>
+                <string>encoding</string>
+                <string>UTF-8</string>
+              </entry>
+              <entry>
+                <string>grammarURL</string>
+                <gate.util.persistence.PersistenceManager-URLHolder>
+                  
<urlString>$relpath$../resources/jape/select-tokens-en.jape</urlString>
+                </gate.util.persistence.PersistenceManager-URLHolder>
+              </entry>
+              <entry>
+                <string>annotationAccessors</string>
+                <null/>
+              </entry>
+              <entry>
+                <string>operators</string>
+                <null/>
+              </entry>
+            </localMap>
+          </initParams>
+          <features class="gate.util.persistence.MapPersistence">
+            <mapType>gate.util.SimpleFeatureMapImpl</mapType>
+            <localMap/>
+          </features>
+        </gate.util.persistence.LanguageAnalyserPersistence>
+        <gate.util.persistence.LanguageAnalyserPersistence>
+          <runtimeParams class="gate.util.persistence.MapPersistence">
+            <mapType>gate.util.SimpleFeatureMapImpl</mapType>
+            <localMap>
+              <entry>
+                <string>outputASName</string>
+                <null/>
+              </entry>
+              <entry>
+                <string>document</string>
+                <null/>
+              </entry>
+              <entry>
+                <string>corpus</string>
+                <null/>
+              </entry>
+              <entry>
+                <string>inputASName</string>
+                <null/>
+              </entry>
+            </localMap>
+          </runtimeParams>
+          <resourceType>gate.creole.ANNIETransducer</resourceType>
+          <resourceName>multiword</resourceName>
+          <initParams class="gate.util.persistence.MapPersistence">
+            <mapType>gate.util.SimpleFeatureMapImpl</mapType>
+            <localMap>
+              <entry>
+                <string>encoding</string>
+                <string>UTF-8</string>
+              </entry>
+              <entry>
+                <string>grammarURL</string>
+                <gate.util.persistence.PersistenceManager-URLHolder>
+                  
<urlString>$relpath$../resources/jape/multiword-main-en.jape</urlString>
+                </gate.util.persistence.PersistenceManager-URLHolder>
+              </entry>
+              <entry>
+                <string>annotationAccessors</string>
+                <null/>
+              </entry>
+              <entry>
+                <string>operators</string>
+                <null/>
+              </entry>
+            </localMap>
+          </initParams>
+          <features class="gate.util.persistence.MapPersistence">
+            <mapType>gate.util.SimpleFeatureMapImpl</mapType>
+            <localMap/>
+          </features>
+        </gate.util.persistence.LanguageAnalyserPersistence>
+        <gate.util.persistence.LanguageAnalyserPersistence>
+          <runtimeParams class="gate.util.persistence.MapPersistence">
+            <mapType>gate.util.SimpleFeatureMapImpl</mapType>
+            <localMap>
+              <entry>
+                <string>outputASName</string>
+                <null/>
+              </entry>
+              <entry>
+                <string>document</string>
+                <null/>
+              </entry>
+              <entry>
+                <string>corpus</string>
+                <null/>
+              </entry>
+              <entry>
+                <string>ontology</string>
+                <null/>
+              </entry>
+              <entry>
+                <string>inputASName</string>
+                <null/>
+              </entry>
+            </localMap>
+          </runtimeParams>
+          <resourceType>gate.creole.Transducer</resourceType>
+          <resourceName>nounsForPMI</resourceName>
+          <initParams class="gate.util.persistence.MapPersistence">
+            <mapType>gate.util.SimpleFeatureMapImpl</mapType>
+            <localMap>
+              <entry>
+                <string>encoding</string>
+                <string>UTF-8</string>
+              </entry>
+              <entry>
+                <string>annotationAccessors</string>
+                <null/>
+              </entry>
+              <entry>
+                <string>operators</string>
+                <null/>
+              </entry>
+              <entry>
+                <string>grammarURL</string>
+                <gate.util.persistence.PersistenceManager-URLHolder>
+                  
<urlString>$relpath$../resources/jape/nouns-for-pmi.jape</urlString>
+                </gate.util.persistence.PersistenceManager-URLHolder>
+              </entry>
+              <entry>
+                <string>binaryGrammarURL</string>
+                <null/>
+              </entry>
+            </localMap>
+          </initParams>
+          <features class="gate.util.persistence.MapPersistence">
+            <mapType>gate.util.SimpleFeatureMapImpl</mapType>
+            <localMap/>
+          </features>
+        </gate.util.persistence.LanguageAnalyserPersistence>
+        <gate.util.persistence.LanguageAnalyserPersistence>
+          <runtimeParams class="gate.util.persistence.MapPersistence">
+            <mapType>gate.util.SimpleFeatureMapImpl</mapType>
+            <localMap>
+              <entry>
+                <string>outputASName</string>
+                <null/>
+              </entry>
+              <entry>
+                <string>document</string>
+                <null/>
+              </entry>
+              <entry>
+                <string>corpus</string>
+                <null/>
+              </entry>
+              <entry>
+                <string>inputASName</string>
+                <null/>
+              </entry>
+            </localMap>
+          </runtimeParams>
+          <resourceType>gate.creole.VPChunker</resourceType>
+          <resourceName>vpChunker</resourceName>
+          <initParams class="gate.util.persistence.MapPersistence">
+            <mapType>gate.util.SimpleFeatureMapImpl</mapType>
+            <localMap>
+              <entry>
+                <string>encoding</string>
+                <string>UTF-8</string>
+              </entry>
+              <entry>
+                <string>grammarURL</string>
+                <gate.util.persistence.PersistenceManager-URLHolder>
+                  
<urlString>$relpath$../../ANNIE/resources/VP/VerbGroups.jape</urlString>
+                </gate.util.persistence.PersistenceManager-URLHolder>
+              </entry>
+            </localMap>
+          </initParams>
+          <features class="gate.util.persistence.MapPersistence">
+            <mapType>gate.util.SimpleFeatureMapImpl</mapType>
+            <localMap/>
+          </features>
+        </gate.util.persistence.LanguageAnalyserPersistence>
+        <gate.util.persistence.LanguageAnalyserPersistence>
+          <runtimeParams class="gate.util.persistence.MapPersistence">
+            <mapType>gate.util.SimpleFeatureMapImpl</mapType>
+            <localMap>
+              <entry>
+                <string>outputASName</string>
+                <null/>
+              </entry>
+              <entry>
+                <string>document</string>
+                <null/>
+              </entry>
+              <entry>
+                <string>corpus</string>
+                <null/>
+              </entry>
+              <entry>
+                <string>ontology</string>
+                <null/>
+              </entry>
+              <entry>
+                <string>inputASName</string>
+                <null/>
+              </entry>
+            </localMap>
+          </runtimeParams>
+          <resourceType>gate.creole.Transducer</resourceType>
+          <resourceName>pmiCandidates</resourceName>
+          <initParams class="gate.util.persistence.MapPersistence">
+            <mapType>gate.util.SimpleFeatureMapImpl</mapType>
+            <localMap>
+              <entry>
+                <string>encoding</string>
+                <string>UTF-8</string>
+              </entry>
+              <entry>
+                <string>annotationAccessors</string>
+                <null/>
+              </entry>
+              <entry>
+                <string>operators</string>
+                <null/>
+              </entry>
+              <entry>
+                <string>grammarURL</string>
+                <gate.util.persistence.PersistenceManager-URLHolder>
+                  
<urlString>$relpath$../resources/jape/nouns-verbs-for-pmi.jape</urlString>
+                </gate.util.persistence.PersistenceManager-URLHolder>
+              </entry>
+              <entry>
+                <string>binaryGrammarURL</string>
+                <null/>
+              </entry>
+            </localMap>
+          </initParams>
+          <features class="gate.util.persistence.MapPersistence">
+            <mapType>gate.util.SimpleFeatureMapImpl</mapType>
+            <localMap/>
+          </features>
+        </gate.util.persistence.LanguageAnalyserPersistence>
+        <gate.util.persistence.PRPersistence>
+          <runtimeParams class="gate.util.persistence.MapPersistence">
+            <mapType>gate.util.SimpleFeatureMapImpl</mapType>
+            <localMap>
+              <entry>
+                <string>outputASName</string>
+                <null/>
+              </entry>
+              <entry>
+                <string>document</string>
+                <null/>
+              </entry>
+              <entry>
+                <string>corpus</string>
+                <null/>
+              </entry>
+              <entry>
+                <string>scriptParams</string>
+                <null/>
+              </entry>
+              <entry>
+                <string>inputASName</string>
+                <null/>
+              </entry>
+            </localMap>
+          </runtimeParams>
+          <resourceType>gate.groovy.ScriptPR</resourceType>
+          <resourceName>cleanCandidates</resourceName>
+          <initParams class="gate.util.persistence.MapPersistence">
+            <mapType>gate.util.SimpleFeatureMapImpl</mapType>
+            <localMap>
+              <entry>
+                <string>encoding</string>
+                <string>UTF-8</string>
+              </entry>
+              <entry>
+                <string>scriptURL</string>
+                <gate.util.persistence.PersistenceManager-URLHolder>
+                  
<urlString>$relpath$../resources/groovy/CleanPMICandidates.groovy</urlString>
+                </gate.util.persistence.PersistenceManager-URLHolder>
+              </entry>
+            </localMap>
+          </initParams>
+          <features class="gate.util.persistence.MapPersistence">
+            <mapType>gate.util.SimpleFeatureMapImpl</mapType>
+            <localMap/>
+          </features>
+        </gate.util.persistence.PRPersistence>
+        <gate.util.persistence.LanguageAnalyserPersistence>
+          <runtimeParams class="gate.util.persistence.MapPersistence">
+            <mapType>gate.util.SimpleFeatureMapImpl</mapType>
+            <localMap>
+              <entry>
+                <string>outputASName</string>
+                <null/>
+              </entry>
+              <entry>
+                <string>document</string>
+                <null/>
+              </entry>
+              <entry>
+                <string>corpus</string>
+                <null/>
+              </entry>
+              <entry>
+                <string>inputASName</string>
+                <null/>
+              </entry>
+            </localMap>
+          </runtimeParams>
+          <resourceType>gate.creole.ANNIETransducer</resourceType>
+          <resourceName>namedEntities</resourceName>
+          <initParams class="gate.util.persistence.MapPersistence">
+            <mapType>gate.util.SimpleFeatureMapImpl</mapType>
+            <localMap>
+              <entry>
+                <string>encoding</string>
+                <string>UTF-8</string>
+              </entry>
+              <entry>
+                <string>grammarURL</string>
+                <gate.util.persistence.PersistenceManager-URLHolder>
+                  
<urlString>$relpath$../resources/jape/named_entities.jape</urlString>
+                </gate.util.persistence.PersistenceManager-URLHolder>
+              </entry>
+              <entry>
+                <string>annotationAccessors</string>
+                <null/>
+              </entry>
+              <entry>
+                <string>operators</string>
+                <null/>
+              </entry>
+            </localMap>
+          </initParams>
+          <features class="gate.util.persistence.MapPersistence">
+            <mapType>gate.util.SimpleFeatureMapImpl</mapType>
+            <localMap/>
+          </features>
+        </gate.util.persistence.LanguageAnalyserPersistence>
+      </localList>
+      <collectionType>java.util.ArrayList</collectionType>
+    </prList>
+    <resourceType>gate.groovy.ScriptableController</resourceType>
+    <resourceName>PMI-Example</resourceName>
+    <initParams class="gate.util.persistence.MapPersistence">
+      <mapType>gate.util.SimpleFeatureMapImpl</mapType>
+      <localMap/>
+    </initParams>
+    <features class="gate.util.persistence.MapPersistence">
+      <mapType>gate.util.SimpleFeatureMapImpl</mapType>
+      <localMap>
+        <entry>
+          <string></string>
+          <string></string>
+        </entry>
+      </localMap>
+    </features>
+  </application>
+</gate.util.persistence.GateApplication>
\ No newline at end of file


Property changes on: 
gate/trunk/plugins/TermRaider/applications/pmi-entity-vp.gapp
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: gate/trunk/plugins/TermRaider/resources/groovy/CleanPMICandidates.groovy
===================================================================
--- gate/trunk/plugins/TermRaider/resources/groovy/CleanPMICandidates.groovy    
                        (rev 0)
+++ gate/trunk/plugins/TermRaider/resources/groovy/CleanPMICandidates.groovy    
2014-02-13 16:39:11 UTC (rev 17301)
@@ -0,0 +1,43 @@
+// Warning: this has to alter the inputAS; the outputAS is ignored.
+
+
+// Delete PMICandidate annotations that span or subspan NEs and
+// Addresses.  Also, copy language feature from Sentence down to term
+// candidates.
+
+Set<String> termTypes = new HashSet<String>();
+termTypes.add("Entity");
+termTypes.add("Verb");
+termTypes.add("VG");
+
+Set<String> exclusionTypes = new HashSet<String>();
+exclusionTypes.add("Person");
+exclusionTypes.add("Organization");
+exclusionTypes.add("Location");
+exclusionTypes.add("Date");
+exclusionTypes.add("Money");
+exclusionTypes.add("Percent");
+exclusionTypes.add("Address");
+
+AnnotationSet candidates = inputAS.get(termTypes);
+for (Annotation candidate : candidates) {
+  // delete unwanted term candidates
+  if (! gate.Utils.getCoveringAnnotations(inputAS, 
candidate).get(exclusionTypes).isEmpty()) {
+    FeatureMap newf = Factory.newFeatureMap();
+    newf.putAll(candidate.getFeatures());
+    String newType = "deleted_NE_" + candidate.getType();
+    inputAS.add(candidate.getStartNode(), candidate.getEndNode(), newType, 
newf);
+    inputAS.remove(candidate);  
+  }
+  
+  // delete single-token VG annotations
+  else if ( candidate.getType().equals("VG") &&
+            (gate.Utils.getContainedAnnotations(inputAS, candidate, 
"Token").size() < 2) ) {
+    FeatureMap newf = Factory.newFeatureMap();
+    newf.putAll(candidate.getFeatures());
+    String newType = "deleted_VG_" + candidate.getType();
+    inputAS.add(candidate.getStartNode(), candidate.getEndNode(), newType, 
newf);
+    inputAS.remove(candidate);  
+  }
+  
+}


Property changes on: 
gate/trunk/plugins/TermRaider/resources/groovy/CleanPMICandidates.groovy
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: gate/trunk/plugins/TermRaider/resources/jape/named_entities.jape
===================================================================
--- gate/trunk/plugins/TermRaider/resources/jape/named_entities.jape            
                (rev 0)
+++ gate/trunk/plugins/TermRaider/resources/jape/named_entities.jape    
2014-02-13 16:39:11 UTC (rev 17301)
@@ -0,0 +1,28 @@
+Phase: NamedEntities
+Input: Person  Organization  Location
+Options: control = all
+
+
+Rule: NamedEntity
+({Person}|{Organization}|{Location}):match
+-->
+:match {
+   long start = matchAnnots.firstNode().getOffset();
+   long end   = matchAnnots.lastNode().getOffset();
+   Annotation match = matchAnnots.iterator().next();
+
+   String canonical = gate.Utils.cleanStringFor(doc, 
matchAnnots).toLowerCase();
+   
+   FeatureMap fm = Factory.newFeatureMap();    
+   fm.putAll(match.getFeatures());
+   fm.put("canonical", canonical);
+   fm.put("original_type", match.getType());
+
+   try {
+       outputAS.add(start, end, "Entity", fm);
+
+   }
+   catch (InvalidOffsetException e) {
+     e.printStackTrace();
+   }
+}
\ No newline at end of file


Property changes on: 
gate/trunk/plugins/TermRaider/resources/jape/named_entities.jape
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: gate/trunk/plugins/TermRaider/resources/jape/nouns-for-pmi.jape
===================================================================
--- gate/trunk/plugins/TermRaider/resources/jape/nouns-for-pmi.jape             
                (rev 0)
+++ gate/trunk/plugins/TermRaider/resources/jape/nouns-for-pmi.jape     
2014-02-13 16:39:11 UTC (rev 17301)
@@ -0,0 +1,11 @@
+Phase: NounsForPMI
+Input: Token
+Options: control = appelt
+
+
+Rule: Nouns
+Priority: 30
+({Token.kind == "word", Token.category ==~ "N.*", Token.length > 2}):token
+-->
+:token.Noun = { rule = "Nouns", lemma = :token.Token.root }
+


Property changes on: 
gate/trunk/plugins/TermRaider/resources/jape/nouns-for-pmi.jape
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: gate/trunk/plugins/TermRaider/resources/jape/nouns-verbs-for-pmi.jape
===================================================================
--- gate/trunk/plugins/TermRaider/resources/jape/nouns-verbs-for-pmi.jape       
                        (rev 0)
+++ gate/trunk/plugins/TermRaider/resources/jape/nouns-verbs-for-pmi.jape       
2014-02-13 16:39:11 UTC (rev 17301)
@@ -0,0 +1,23 @@
+Phase: ThingsForPMI
+Input: Token MultiWordTermCandidate
+Options: control = all
+
+
+Rule: Noun
+({Token.kind == "word", Token.category ==~ "N.*", Token.length > 2}):token
+-->
+:token.Entity = { rule = "Noun", canonical = :token.Token.root }
+
+
+Rule: Verb
+({Token.kind == "word", Token.category ==~ "V.*", Token.length > 2}):token
+-->
+:token.Verb = { rule = "Verb", canonical = :token.Token.root }
+
+
+Rule: MultiWord
+({MultiWordTermCandidate}):match
+-->
+:match.Entity = { rule = "MultiWord", canonical = 
:match.TermCandidate.canonical }
+
+


Property changes on: 
gate/trunk/plugins/TermRaider/resources/jape/nouns-verbs-for-pmi.jape
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
Android apps run on BlackBerry 10
Introducing the new BlackBerry 10.2.1 Runtime for Android apps.
Now with support for Jelly Bean, Bluetooth, Mapview and more.
Get your Android app in front of a whole new audience.  Start now.
http://pubads.g.doubleclick.net/gampad/clk?id=124407151&iu=/4140/ostg.clktrk
_______________________________________________
GATE-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gate-cvs

Reply via email to