Basic/Non
Collapased: This representation gives the basic dependencies as well as the
extra ones (which break the tree structure), without any collapsing or
propagation of conjuncts. Eg.

prep(based-7,
in-8)

pobj(in-8, LA-9)

Collapased
: In the collapsed representation, dependencies involving prepositions,
conjuncts, as well as information about the referent of relative clauses are
collapsed to get direct dependencies between content words. For instance, the
dependencies involving the preposition “in” in the above example will be
collapsed into one single relation:

prep(based-7,
in-8)

pobj(in-8, LA-9)

will become :
prep_in(based-7, LA-9)

Now we’ll see, how can we get these using JAVA Code.

import java.util.*;

import edu.stanford.nlp.ling.*;

import edu.stanford.nlp.trees.*;

import
edu.stanford.nlp.parser.lexparser.LexicalizedParser;

class ParserDemo {

public
static void main(String[] args) {

LexicalizedParser
lp = LexicalizedParser

.loadModel("edu/stanford/nlp/models/lexparser/englishPCFG.ser.gz");

lp.setOptionFlags(new
String[] { "-maxLength", "80",

"-retainTmpSubcategories"
});

String[]
sent = { "This", "is", "an", "easy",
"sentence", "." };

List<CoreLabel>
rawWords = Sentence.toCoreLabelList(sent);

Tree
parse = lp.apply(rawWords);

parse.pennPrint();

System.out.println();

TreebankLanguagePack
tlp = new PennTreebankLanguagePack();

GrammaticalStructureFactory
gsf = tlp.grammaticalStructureFactory();

GrammaticalStructure
gs = gsf.newGrammaticalStructure(parse);

List<TypedDependency>
tdl = gs.typedDependenciesCCprocessed();

System.out.println(tdl);

TreePrint
tp = new TreePrint("penn,typedDependenciesCollapsed");

tp.printTree(parse);

}

}

Now you can easily extract the triplets from document. You can find the example code in github repo.

Hello Every one,I am new to dependency parsing. Anyone help me regarding the following in MALT or MST parser 1. what are the features for training.2. How to train sentences using featuresPlease anyone explain the above two cases with examples.