You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ctakes.apache.org by tm...@apache.org on 2012/11/29 21:15:16 UTC

svn commit: r1415353 - in /incubator/ctakes/trunk/ctakes-relation-extractor/src/main: java/org/apache/ctakes/relationextractor/ae/features/ java/org/apache/ctakes/relationextractor/pipelines/ resources/org/apache/ctakes/relationextractor/models/em_pair/

Author: tmill
Date: Thu Nov 29 20:15:15 2012
New Revision: 1415353

URL: http://svn.apache.org/viewvc?rev=1415353&view=rev
Log:
ctakes-111: Added classes and simple model for tree kernel fragment features in relation-extractor.

Added:
    incubator/ctakes/trunk/ctakes-relation-extractor/src/main/java/org/apache/ctakes/relationextractor/ae/features/TreeFragmentFeatureExtractor.java   (with props)
    incubator/ctakes/trunk/ctakes-relation-extractor/src/main/java/org/apache/ctakes/relationextractor/pipelines/TreeFeatureConsumer.java   (with props)
    incubator/ctakes/trunk/ctakes-relation-extractor/src/main/resources/org/apache/ctakes/relationextractor/models/em_pair/frags_nolex_args.txt   (with props)

Added: incubator/ctakes/trunk/ctakes-relation-extractor/src/main/java/org/apache/ctakes/relationextractor/ae/features/TreeFragmentFeatureExtractor.java
URL: http://svn.apache.org/viewvc/incubator/ctakes/trunk/ctakes-relation-extractor/src/main/java/org/apache/ctakes/relationextractor/ae/features/TreeFragmentFeatureExtractor.java?rev=1415353&view=auto
==============================================================================
--- incubator/ctakes/trunk/ctakes-relation-extractor/src/main/java/org/apache/ctakes/relationextractor/ae/features/TreeFragmentFeatureExtractor.java (added)
+++ incubator/ctakes/trunk/ctakes-relation-extractor/src/main/java/org/apache/ctakes/relationextractor/ae/features/TreeFragmentFeatureExtractor.java Thu Nov 29 20:15:15 2012
@@ -0,0 +1,102 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.ctakes.relationextractor.ae.features;
+
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Scanner;
+
+import org.apache.ctakes.constituency.parser.treekernel.TreeExtractor;
+import org.apache.ctakes.constituency.parser.util.AnnotationTreeUtils;
+import org.apache.ctakes.constituency.parser.util.TreeUtils;
+import org.apache.ctakes.core.resource.FileLocator;
+import org.apache.ctakes.typesystem.type.syntax.TopTreebankNode;
+import org.apache.ctakes.typesystem.type.syntax.TreebankNode;
+import org.apache.ctakes.typesystem.type.textsem.IdentifiedAnnotation;
+import org.apache.ctakes.utils.tree.FragmentUtils;
+import org.apache.ctakes.utils.tree.SimpleTree;
+import org.apache.uima.analysis_engine.AnalysisEngineProcessException;
+import org.apache.uima.jcas.JCas;
+import org.cleartk.classifier.Feature;
+
+/* 
+ * This class implements a ClearTK feature extractor for tree kernel fragment features
+ * as derived using the flink toolkit (http://danielepighin.net/cms/software/flink).
+ * Model location is hardcoded as of right now.
+ * TODO: Parameterize & unstaticize this so that, e.g., multiple projects could use this feature if necessary.
+ */
+public class TreeFragmentFeatureExtractor implements RelationFeaturesExtractor {
+
+	static HashSet<SimpleTree> frags = null;
+
+	public TreeFragmentFeatureExtractor(){
+		if(frags == null) initializeFrags();
+	}
+
+
+	private static void initializeFrags(){
+		frags = new HashSet<SimpleTree>();
+		try{
+//			File fragsFile = FileLocator.locateFile("resources/frags_args.txt");
+			File fragsFile = FileLocator.locateFile("org/apache/ctakes/relationextractor/models/em_pair/frags_nolex_args.txt");
+			Scanner scanner = new Scanner(fragsFile);
+			while(scanner.hasNextLine()){
+				frags.add(FragmentUtils.frag2tree(scanner.nextLine().trim()));
+			}
+		}catch(FileNotFoundException e){
+			System.err.println("Missing fragment file!");
+		}
+	}
+
+	@Override
+	public List<Feature> extract(JCas jcas, IdentifiedAnnotation arg1,
+			IdentifiedAnnotation arg2) throws AnalysisEngineProcessException {
+		List<Feature> features = new ArrayList<Feature>();
+		// first get the root and print it out...
+		TopTreebankNode root = AnnotationTreeUtils.getTreeCopy(jcas, AnnotationTreeUtils.getAnnotationTree(jcas, arg1));
+//		SimpleTree tempClone = TreeExtractor.getSimpleClone(root);
+		TreebankNode t1 = AnnotationTreeUtils.insertAnnotationNode(jcas, root, arg1, "ARG1");
+		TreebankNode t2 = AnnotationTreeUtils.insertAnnotationNode(jcas, root, arg2, "ARG2");
+
+		SimpleTree tree = null;
+		if(t1.getBegin() <= t2.getBegin() && t1.getEnd() >= t2.getEnd()){
+			// t1 encloses t2
+			tree = TreeExtractor.getSimpleClone(t1);
+		}else if(t2.getBegin() <= t1.getBegin() && t2.getEnd() >= t1.getEnd()){
+			// t2 encloses t1
+			tree = TreeExtractor.getSimpleClone(t2);
+		}else{
+			tree = TreeExtractor.extractPathEnclosedTree(t1, t2, jcas);
+		}
+
+		for(SimpleTree frag : frags){
+			if(TreeUtils.containsIgnoreCase(tree, frag)){
+				features.add(new Feature("TK_" + frag.toString()));
+				//			}else{
+				//				features.add(new Feature(frag.toString(), false));
+			}
+		}
+
+		return features;
+	}
+
+}

Propchange: incubator/ctakes/trunk/ctakes-relation-extractor/src/main/java/org/apache/ctakes/relationextractor/ae/features/TreeFragmentFeatureExtractor.java
------------------------------------------------------------------------------
    svn:executable = *

Propchange: incubator/ctakes/trunk/ctakes-relation-extractor/src/main/java/org/apache/ctakes/relationextractor/ae/features/TreeFragmentFeatureExtractor.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: incubator/ctakes/trunk/ctakes-relation-extractor/src/main/java/org/apache/ctakes/relationextractor/pipelines/TreeFeatureConsumer.java
URL: http://svn.apache.org/viewvc/incubator/ctakes/trunk/ctakes-relation-extractor/src/main/java/org/apache/ctakes/relationextractor/pipelines/TreeFeatureConsumer.java?rev=1415353&view=auto
==============================================================================
--- incubator/ctakes/trunk/ctakes-relation-extractor/src/main/java/org/apache/ctakes/relationextractor/pipelines/TreeFeatureConsumer.java (added)
+++ incubator/ctakes/trunk/ctakes-relation-extractor/src/main/java/org/apache/ctakes/relationextractor/pipelines/TreeFeatureConsumer.java Thu Nov 29 20:15:15 2012
@@ -0,0 +1,249 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.ctakes.relationextractor.pipelines;
+
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.ctakes.constituency.parser.treekernel.TreeExtractor;
+import org.apache.ctakes.constituency.parser.util.AnnotationTreeUtils;
+import org.apache.ctakes.relationextractor.eval.XMIReader;
+import org.apache.ctakes.typesystem.type.relation.BinaryTextRelation;
+import org.apache.ctakes.typesystem.type.syntax.TopTreebankNode;
+import org.apache.ctakes.typesystem.type.syntax.TreebankNode;
+import org.apache.ctakes.typesystem.type.textsem.EntityMention;
+import org.apache.ctakes.typesystem.type.textspan.Sentence;
+import org.apache.ctakes.utils.tree.SimpleTree;
+import org.apache.uima.UIMAException;
+import org.apache.uima.UimaContext;
+import org.apache.uima.analysis_engine.AnalysisEngine;
+import org.apache.uima.analysis_engine.AnalysisEngineProcessException;
+import org.apache.uima.cas.CASException;
+import org.apache.uima.collection.CollectionReader;
+import org.apache.uima.jcas.JCas;
+import org.apache.uima.jcas.tcas.Annotation;
+import org.apache.uima.resource.ResourceInitializationException;
+import org.apache.uima.resource.metadata.TypeSystemDescription;
+import org.uimafit.descriptor.ConfigurationParameter;
+import org.uimafit.factory.AnalysisEngineFactory;
+import org.uimafit.factory.CollectionReaderFactory;
+import org.uimafit.factory.TypeSystemDescriptionFactory;
+import org.uimafit.pipeline.SimplePipeline;
+import org.uimafit.util.JCasUtil;
+
+/*
+ * This class is for writing trees to a file which are then used by a tree-kernel
+ * SVM for training/model building.  
+ * 
+ * @author Tim Miller (timothy.miller@childrens.harvard.edu)
+ */
+public class TreeFeatureConsumer extends org.uimafit.component.JCasAnnotator_ImplBase {
+	private static final String NO_RELATION_CATEGORY = "-NONE-";
+	public static final String PARAM_OUTFILE = "outputFilename";
+	public static final String PARAM_CLASSIFY_BOTH_DIRECTIONS = "ClassifyBothDirections";
+	private PrintWriter out = null;
+	PrintWriter rels = null;
+	PrintWriter trees = null;
+	int docNum = 0;
+	int lineNum = 0;
+	
+	@ConfigurationParameter(
+			name = PARAM_OUTFILE,
+			mandatory = true,
+			description = "The file of tree examples in svm-light-tk format.")
+			private String outputFile;
+
+	protected final boolean classifyBothDirections = false;
+
+	@Override
+	public void initialize(UimaContext aContext) throws ResourceInitializationException {
+		super.initialize(aContext);
+		try {
+			out = new PrintWriter(outputFile);
+			String relFilename = (new File(outputFile)).getParent() + "/rels.txt";
+			rels = new PrintWriter(relFilename);
+			String treeFilename = (new File(outputFile)).getParent()+ "/wholetrees.txt";
+			trees = new PrintWriter(treeFilename);
+		} catch (FileNotFoundException e) {
+			e.printStackTrace();
+			throw new ResourceInitializationException();
+		}
+	}
+	
+	@Override
+	public void process(JCas jcas) {
+		// lookup from pair of annotations to binary text relation
+		// note: assumes that there will be at most one relation per pair
+		JCas goldView = null;
+		try {
+			goldView = jcas.getView("GoldView");
+		} catch (CASException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		}
+		Map<List<Annotation>, BinaryTextRelation> relationLookup;
+		relationLookup = new HashMap<List<Annotation>, BinaryTextRelation>();
+		for (BinaryTextRelation relation: JCasUtil.select(goldView, BinaryTextRelation.class)) {
+			  Annotation arg1, arg2;
+			  if (relation.getArg1().getRole().equals("Argument")) {
+				  arg1 = relation.getArg1().getArgument();
+				  arg2 = relation.getArg2().getArgument();
+			  } else {
+				  arg2 = relation.getArg1().getArgument();
+				  arg1 = relation.getArg2().getArgument();
+			  }
+//			Annotation arg1 = relation.getArg1().getArgument();
+//			Annotation arg2 = relation.getArg2().getArgument();
+			List<Annotation> key = new ArrayList<Annotation>(Arrays.asList(arg1, arg2));
+			relationLookup.put(key, relation);
+		}
+
+		// walk through each sentence in the text
+		for (Sentence sentence : JCasUtil.select(jcas, Sentence.class)) {
+
+			// collect all possible relation arguments from the sentence
+			List<EntityMention> args = JCasUtil.selectCovered(
+					goldView,
+					EntityMention.class,
+					sentence);
+
+			// walk through the pairs
+			for (int i = 0; i < args.size(); ++i) {
+				EntityMention arg1 = args.get(i);
+				int jStart = this.classifyBothDirections ? 0 : i + 1;
+				for (int j = jStart; j < args.size(); ++j) {
+					EntityMention arg2 = args.get(j);
+					// skip identical entity mentions and mentions with identical spans
+					if (i == j || (arg1.getBegin() == arg2.getBegin() && arg1.getEnd() == arg2.getEnd())) {
+						continue;
+					}
+					// load the relation label from the CAS (if there is one)
+					List<Annotation> key = new ArrayList<Annotation>(Arrays.asList(arg1, arg2));
+					String category;
+					if (relationLookup.containsKey(key)) {
+						BinaryTextRelation relation = relationLookup.get(key);
+						category = relation.getCategory();
+					} else {
+						// first check for opposite direction
+						key = new ArrayList<Annotation>(Arrays.asList(arg2,arg1));
+						if(relationLookup.containsKey(key)){
+							// reverse direction
+							BinaryTextRelation relation = relationLookup.get(key);
+							category = relation.getCategory() + "-1";
+						}else{
+							category = NO_RELATION_CATEGORY;
+						}
+					}
+					
+					// first get the root and print it out...
+					TopTreebankNode root = AnnotationTreeUtils.getTreeCopy(jcas, AnnotationTreeUtils.getAnnotationTree(jcas, arg1));
+					SimpleTree tempClone = TreeExtractor.getSimpleClone(root);
+					trees.println(tempClone.toString());
+//					TopTreebankNode t2 = AnnotationTreeUtils.getTreeCopy(AnnotationTreeUtils.getAnnotationTree(jcas, arg2));
+					
+					if(root == null){
+						System.err.println("Root is null!");
+					}
+					TreebankNode t1 = AnnotationTreeUtils.insertAnnotationNode(jcas, root, arg1, "ARG1");
+					TreebankNode t2 = AnnotationTreeUtils.insertAnnotationNode(jcas, root, arg2, "ARG2");
+					String relationString = category + "(\"" + arg1.getCoveredText() + "\", \"" + arg2.getCoveredText() + "\")";
+					rels.print("\t");
+					rels.print(lineNum);
+					rels.print("\t");
+					rels.println(relationString);
+					rels.flush();
+					lineNum++;
+//					root.setNodeType(category);
+//					out.println(TreeExtractor.getSimpleClone(root));
+//					out.flush();
+					
+					
+					SimpleTree tree = null;
+					if(t1.getBegin() <= t2.getBegin() && t1.getEnd() >= t2.getEnd()){
+						// t1 encloses t2
+						tree = TreeExtractor.getSimpleClone(t1);
+					}else if(t2.getBegin() <= t1.getBegin() && t2.getEnd() >= t1.getEnd()){
+						// t2 encloses t1
+						tree = TreeExtractor.getSimpleClone(t2);
+					}else{
+						tree = TreeExtractor.extractPathEnclosedTree(t1, t2, jcas);
+					}
+					if(category.equals("location_of-1")){
+						out.print("+1 |BT| ");
+					}else{
+						out.print("-1 |BT| ");
+					}
+					TreeExtractor.lowercaseWords(tree);
+					out.print(tree.toString());
+					out.println(" |ET|");
+//					root.setNodeType("TOP");
+					out.flush();
+				}
+			}
+		}
+	}
+	
+	@Override
+	public void collectionProcessComplete()
+			throws AnalysisEngineProcessException {
+		// TODO Auto-generated method stub
+		super.collectionProcessComplete();
+		out.close();
+		rels.close();
+		trees.close();
+	}
+	
+	public static void main(String[] args){
+		if(args.length < 2){
+			System.err.println("Usage: TreeFeatureConsumer <training data> <output file>");
+			System.exit(-1);
+		}
+		File trainDir = new File(args[0]);
+		if(!trainDir.isDirectory()){
+			System.err.println("First arg should be a directory! (full of xmi files)");
+			System.exit(-1);
+		}
+		File[] files = trainDir.listFiles();
+		String[] paths = new String[files.length];
+		for(int i = 0; i < files.length; i++){
+			paths[i] = files[i].getAbsolutePath();
+		}
+//		TypeSystemDescription typeSystem = TypeSystemDescriptionFactory.createTypeSystemDescriptionFromPath("../common-type-system/desc/common_type_system.xml");
+		try {
+			CollectionReader xmiReader = CollectionReaderFactory.createCollectionReader(XMIReader.class, XMIReader.PARAM_FILES, paths);
+			AnalysisEngine treeConsumer = AnalysisEngineFactory.createPrimitive(TreeFeatureConsumer.class, 
+													TreeFeatureConsumer.PARAM_OUTFILE, args[1], 
+													TreeFeatureConsumer.PARAM_CLASSIFY_BOTH_DIRECTIONS, true);
+			SimplePipeline.runPipeline(xmiReader, treeConsumer);
+		} catch (ResourceInitializationException e) {
+			e.printStackTrace();
+		} catch (UIMAException e) {
+			e.printStackTrace();
+		} catch (IOException e) {
+			e.printStackTrace();
+		}
+	}
+}

Propchange: incubator/ctakes/trunk/ctakes-relation-extractor/src/main/java/org/apache/ctakes/relationextractor/pipelines/TreeFeatureConsumer.java
------------------------------------------------------------------------------
    svn:executable = *

Propchange: incubator/ctakes/trunk/ctakes-relation-extractor/src/main/java/org/apache/ctakes/relationextractor/pipelines/TreeFeatureConsumer.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: incubator/ctakes/trunk/ctakes-relation-extractor/src/main/resources/org/apache/ctakes/relationextractor/models/em_pair/frags_nolex_args.txt
URL: http://svn.apache.org/viewvc/incubator/ctakes/trunk/ctakes-relation-extractor/src/main/resources/org/apache/ctakes/relationextractor/models/em_pair/frags_nolex_args.txt?rev=1415353&view=auto
==============================================================================
--- incubator/ctakes/trunk/ctakes-relation-extractor/src/main/resources/org/apache/ctakes/relationextractor/models/em_pair/frags_nolex_args.txt (added)
+++ incubator/ctakes/trunk/ctakes-relation-extractor/src/main/resources/org/apache/ctakes/relationextractor/models/em_pair/frags_nolex_args.txt Thu Nov 29 20:15:15 2012
@@ -0,0 +1,273 @@
+(PP(ARG2)(.)) 
+(PP(ARG2)(.(.))) 
+(PP(ARG2)) 
+(PP(ARG2(JJ))) 
+(ARG2(LST)(LST)) 
+(ARG2(LST(NN))(LST)) 
+(ARG2(LST(RB))(LST)) 
+(ARG2(LST(JJ))(LST)) 
+(ARG2(LST)(LST(JJ))) 
+(ARG2(LST)(LST(NNS))) 
+(ARG2(LST)(LST)(LST)(LST)(LST)(LST)(LST)(LST)) 
+(ARG2(LST)(LST)(LST)(LST)(LST)) 
+(ARG2(LST(NN))(LST)(LST(DT))(LST(JJ))(LST)) 
+(ARG2(LST(JJ))(LST)(LST(JJ))(LST(JJ))(LST)) 
+(ARG2(LST)(LST)(LST(DT))(LST(JJ))(LST(NN))) 
+(ARG2(LST)(LST)(LST(JJ))(LST(JJ))(LST(NNS))) 
+(ARG2(LST(NN))(LST)(LST)(LST(JJ))(LST(NN))) 
+(ARG2(LST(JJ))(LST)(LST)(LST(JJ))(LST(NNS))) 
+(ARG2(LST(NN))(LST)(LST(DT))(LST)(LST(NN))) 
+(ARG2(LST(JJ))(LST(JJ))(LST)(LST(JJ))(LST)) 
+(ARG2(LST)(PP)) 
+(ARG2(LST)(PP(LST))) 
+(ARG2(PP)) 
+(ARG2(PP(JJ))) 
+(ARG2(PP(NNS))) 
+(ARG2(PP(NN))) 
+(ARG2(PP(NN)(JJ))) 
+(ARG2(LST)(LST)(LST)(LST)) 
+(ARG2(LST(JJ))(LST(JJ))(LST)(LST)) 
+(ARG2(LST)(LST(JJ))(LST(JJ))(LST)) 
+(ARG2(LST)(LST(JJ))(LST)(LST(NN))) 
+(ARG2(LST)(LST)(LST(JJ))(LST(NN))) 
+(ARG2(LST(JJ))(LST)(LST)(LST(NN))) 
+(ARG2(LST(JJ))(LST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ST(JJ))(LST))) 
+(NP(ARG1)(ARG2(LST)(LST(NN)))) 
+(NP(ARG1)(LST)(LST)(LST)(LST)(LST)(LST)(LST)(LST)(LST)(ARG2)) 
+(NP(ARG1)(LST)(LST)(LST)(LST)(LST)(LST)(LST)(LST)(LST)(LST)(ARG2)) 
+(NP(ARG1)(LST)(LST)(LST)(ARG2)) 
+(NP(ARG1)(LST(IN))(LST(DT))(LST)(ARG2(LST)(LST))) 
+(NP(ARG1)(LST(IN))(LST(DT))(LST)(ARG2(LST)(LST)(LST))) 
+(NP(ARG1(LST)(LST))(LST(IN))(LST(DT))(LST)(ARG2)) 
+(NP(ARG1(LST)(LST))(LST(IN))(LST)(LST(JJ))(ARG2)) 
+(NP(ARG1(LST)(LST))(LST)(LST(DT))(LST(JJ))(ARG2)) 
+(NP(ARG1(LST))(LST(JJ))(LST)(LST)(ARG2(LST))) 
+(NP(ARG1(LST))(LST(NN))(LST)(LST)(ARG2(LST))) 
+(NP(ARG1)(LST(IN))(LST)(LST(JJ))(ARG2(LST)(LST)(LST))) 
+(NP(ARG1)(LST(IN))(LST)(LST(JJ))(ARG2(LST)(LST))) 
+(NP(ARG1)(LST)(LST(DT))(LST(JJ))(ARG2(LST)(LST))) 
+(NP(ARG1)(LST(NN))(LST(IN))(LST(DT))(ARG2)) 
+(NP(ARG1)(LST(IN))(LST(DT))(LST(JJ))(ARG2)) 
+(NP(ARG1(LST)(LST))(LST)(LST(DT))(LST)(ARG2(LST)(LST))) 
+(NP(ARG1)(LST)(LST)(LST)(LST)(LST)(LST)(LST)(LST)(LST)(LST)(LST)(LST)(ARG2)) 
+(NP(ARG1)(LST)(LST)(LST)(LST)(ARG2)) 
+(NP(ARG1(LST))(LST(IN))(LST(DT))(LST)(LST)(ARG2)) 
+(NP(ARG1)(LST)(LST(NN))(LST(IN))(LST(DT))(ARG2)) 
+(NP(ARG1)(LST(VBZ))(LST)(LST(IN))(LST(DT))(ARG2)) 
+(ARG1(LST)(LST)(LST)(LST)(LST)(LST)(ARG2)) 
+(ARG1(LST)(LST)(ARG2)) 
+(ARG1(LST(JJ))(LST(CC))(ARG2)) 
+(ARG1(LST)(LST(CC))(ARG2(LST)(LST)(LST))) 
+(ARG1(LST(JJ))(LST)(ARG2(LST)(LST))) 
+(ARG1(LST)(LST)(LST)(LST)(ARG2)) 
+(ARG1(LST(JJ))(LST(NN))(LST)(LST(DT))(ARG2)) 
+(ARG1(LST)(LST(NN))(LST(IN))(LST(DT))(ARG2)) 
+(ARG1(ARG2)(LST)(LST)(LST)(LST)(LST)) 
+(ARG1(ARG2)(LST)(LST)) 
+(ARG1(PP)(NP)) 
+(ARG1(PP(JJ))(NP)) 
+(ARG1(PP(NN))(NP)) 
+(ARG1(PP)(NP(PP))) 
+(ARG1(ARG2)(LST)(LST)(LST)(LST)) 
+(ARG1(VP)(PP)(PP)) 
+(ARG1(VP(PP))(PP)(PP(NN))) 
+(ARG1(ARG2)(LST)(LST)(LST)(LST)(LST)(LST)(LST)(LST)) 
+(ARG1(VP)(PP)) 
+(ARG1(ARG2)(LST)(LST)(LST)) 
+(ARG1(ARG2)(LST(IN))(LST)(LST(NN))) 
+(ARG1(ARG2)) 
+(ARG1(ARG2(INC))) 
+(ARG1(ARG2(INC(LST)))) 
+(ARG1(ARG2(VP))) 
+(ARG1(ARG2(VP(VP)(PP)))) 
+(ARG1(LST)(ARG2)(LST)) 
+(ARG1(LST(JJ))(ARG2(LST))(LST)) 
+(ARG1(LST(JJ))(ARG2(LST(NN)))(LST)) 
+(ARG1(LST(JJ))(ARG2(LST(JJ)))(LST)) 
+(ARG1(LST)(ARG2(LST))(LST(NN))) 
+(ARG1(LST)(ARG2(LST(NN)))(LST(NN))) 
+(ARG1(LST)(ARG2(LST(JJ)))(LST(NN))) 
+(ARG1(NP)) 
+(ARG1(NP(PP))) 
+(ARG1(NP(PP(NN)))) 
+(ARG1(ARG2)(PP)) 
+(ARG1(ARG2(PP))(PP)) 
+(ARG1(ARG2(PP(JJ)))(PP)) 
+(ARG1(ARG2)(PP(NN))) 
+(ARG1(PP)(PP)(PP)) 
+(ARG1(ARG2)(LST)(LST)(LST)(LST)(LST)(LST)(LST)) 
+(ARG1(LST)(LST)(LST)(LST)(LST)) 
+(ARG1(LST)(LST)) 
+(ARG1(LST(NN))(LST)) 
+(ARG1(LST(RB))(LST)) 
+(ARG1(LST(JJ))(LST)) 
+(ARG1(LST)(LST(JJ))) 
+(ARG1(LST)(LST(NNS))) 
+(ARG1(LST)(LST)(LST)(LST)(LST)(LST)(LST)(LST)(LST)(ARG2)) 
+(ARG1(LST)) 
+(ARG1(LST(NNS))) 
+(ARG1(LST(JJ))) 
+(ARG1(LST(VBZ))) 
+(ARG1(LST(NN))) 
+(ARG1(LST)(LST)(LST)(ARG2)) 
+(ARG1(LST(JJ))(LST(JJ))(LST)(ARG2)) 
+(ARG1(LST(NN))(LST(IN))(LST)(ARG2)) 
+(ARG1(LST)(LST(IN))(LST(DT))(ARG2)) 
+(ARG1(LST(NN))(LST)(LST(DT))(ARG2)) 
+(ARG1(LST)(LST)(LST)(LST)(LST)(ARG2)) 
+(ARG1(LST)(LST)(LST)(LST)(LST)(LST)(LST)) 
+(ARG1(LST)(ARG2)) 
+(ARG1(LST(JJ))(ARG2)) 
+(ARG1(LST(NN))(ARG2)) 
+(ARG1(LST)(ARG2(LST))) 
+(ARG1(LST)(ARG2(LST(NN)))) 
+(ARG1(ARG2)(LST)(LST)(LST)(LST)(LST)(LST)) 
+(ARG1(LST)(ARG2)(LST)(LST)(LST)) 
+(ARG1(ARG2)(LST)) 
+(ARG1(ARG2(LST))(LST)) 
+(ARG1(ARG2(LST(JJ)))(LST)) 
+(ARG1(ARG2(LST)(LST))(LST)) 
+(ARG1(ARG2(LST(JJ))(LST))(LST)) 
+(ARG1(ARG2)(LST(NN))) 
+(ARG1(ARG2)(LST(NNS))) 
+(ARG1(LST)(LST)(LST)) 
+(ARG1(LST(JJ))(LST(JJ))(LST)) 
+(ARG1(LST)(LST(JJ))(LST(NN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+(VP(VP(ARG1))(PP)(PP)(ARG2(PP))) 
+(VP(VP(ARG1))(PP)(PP)(ARG2(PP(NN)))) 
+(VP(VP(ARG1(PP)))(PP)(PP)(ARG2(PP))) 
+(VP(VP(ARG1))(PP)(PP(JJ))(ARG2)) 
+(VP(VP(ARG1(PP)))(PP)(PP(JJ))(ARG2)) 
+(S(ARG1)(NP)(VP)) 
+(S(ARG1(PP))(NP(PP))(VP)) 
+(S(ARG1(PP))(NP(PP(IN)))(VP)) 
+(S(ARG1(PP(NN)))(NP(PP))(VP)) 
+(S(ARG1)(NP(PP))(VP(VP))) 
+(S(ARG1)(NP(PP(IN)))(VP(VP))) 
+(S(ARG1(PP))(NP)(VP(VP))) 
+(S(ARG1(PP(NN)))(NP)(VP(VP))) 
+(S(ARG1)(ARG2)) 
+(S(ARG1)(ARG2(VP))) 
+(S(ARG1)(ARG2(VP(VP)(PP)))) 
+(S(ARG1)(VP)) 
+(S(ARG1(PP)(NP))(VP)) 
+(S(ARG1(PP(JJ))(NP))(VP)) 
+(S(ARG1(PP)(NP(PP)))(VP)) 
+(S(ARG1(NP))(VP)) 
+(S(ARG1)(VP(VP))) 

Propchange: incubator/ctakes/trunk/ctakes-relation-extractor/src/main/resources/org/apache/ctakes/relationextractor/models/em_pair/frags_nolex_args.txt
------------------------------------------------------------------------------
    svn:mime-type = text/plain