C# Class MSTParser.MSTParser

ファイルを表示 Open project: rasoolims/MSTParserCSharp

Public Methods

Method Description
Evaluate ( string goldFile, string outFile ) : EvaluationResult

Evaluates the specified gold file (The file with Correct Dependecy Labels) with out file (the output file of the parser)

Parse ( string words, string posTags, DependencyParser parser, string &labels, int &deps ) : void

Parses the specified words with the specified trained parser.

Parse ( string words, string posTags, string modelName, bool labeled, int order, string &labels, int &deps ) : void

Parses the specified sentence composed of words.

Parse ( string words, string posTags, string modelName, bool labeled, string &labels, int &deps ) : void

Parses the specified words, order is by default 2

Parse ( string words, string posTags, string modelName, int order, string &labels, int &deps ) : void

Parses the specified words. Create forest is by default true

Parse ( string words, string posTags, string modelName, string &labels, int &deps ) : void

Parses the specified words, order is by default 2 and labeled is true

Test ( string testFile, string modelName, string outFile ) : void

Tests the specified test file, order is by default= 1

Test ( string testFile, string modelName, string outFile, int order ) : void

Tests the specified test file.

Train ( string trainFile, string modelName ) : void

Train the paser with train file, order is by default=1, createforest=true,trainingK=1,isProjective=true,numOfTrainingIterations=10

Train ( string trainFile, string modelName, int numOfTrainingIterations ) : void

Train the paser with train file, order is by default=1, createforest=true,trainingK=1,isProjective=true

Train ( string trainFile, string modelName, int numOfTrainingIterations, bool isProjective ) : void

Train the paser with train file, order is by default=1, createforest=true,trainingK=1

Train ( string trainFile, string modelName, int numOfTrainingIterations, bool isProjective, int trainingK ) : void

Train the paser with train file, order is by default=1, createforest=true

Train ( string trainFile, string modelName, int numOfTrainingIterations, bool isProjective, int trainingK, bool createForest ) : void

Train the paser with train file, order is by default=1

Train ( string trainFile, string modelName, int numOfTrainingIterations, bool isProjective, int trainingK, bool createForest, int order ) : void

Train the paser with train file.

Method Details

Evaluate() public static method

Evaluates the specified gold file (The file with Correct Dependecy Labels) with out file (the output file of the parser)
public static Evaluate ( string goldFile, string outFile ) : EvaluationResult
goldFile string The gold file path
outFile string The out file path
return EvaluationResult

Parse() public static method

Parses the specified words with the specified trained parser.
public static Parse ( string words, string posTags, DependencyParser parser, string &labels, int &deps ) : void
words string The words.
posTags string The pos tags.
parser DependencyParser The trained parser.
labels string The labels.
deps int The deps.
return void

Parse() public static method

Parses the specified sentence composed of words.
public static Parse ( string words, string posTags, string modelName, bool labeled, int order, string &labels, int &deps ) : void
words string The words.
posTags string The pos tags.
modelName string Name of the model.
labeled bool if set to true [labeled].
order int The order.
labels string The labels as an output.
deps int The deps as an output.
return void

Parse() public static method

Parses the specified words, order is by default 2
public static Parse ( string words, string posTags, string modelName, bool labeled, string &labels, int &deps ) : void
words string The words.
posTags string The pos tags.
modelName string Name of the model.
labeled bool if set to true [labeled].
labels string The labels.
deps int The deps.
return void

Parse() public static method

Parses the specified words. Create forest is by default true
public static Parse ( string words, string posTags, string modelName, int order, string &labels, int &deps ) : void
words string The words.
posTags string The pos tags.
modelName string Name of the model.
order int The order.
labels string The labels.
deps int The deps.
return void

Parse() public static method

Parses the specified words, order is by default 2 and labeled is true
public static Parse ( string words, string posTags, string modelName, string &labels, int &deps ) : void
words string The words.
posTags string The pos tags.
modelName string Name of the model.
labels string The labels.
deps int The deps.
return void

Test() public static method

Tests the specified test file, order is by default= 1
public static Test ( string testFile, string modelName, string outFile ) : void
testFile string The test file.
modelName string Model Path
outFile string The parser output path
return void

Test() public static method

Tests the specified test file.
public static Test ( string testFile, string modelName, string outFile, int order ) : void
testFile string The test file.
modelName string Model Path
outFile string The parser output path
order int is either 1 or 2 /// Default is 1 /// Specifies the order/scope of features. 1 only has features over single edges /// and 2 has features over pairs of adjacent edges in the tree
return void

Train() public static method

Train the paser with train file, order is by default=1, createforest=true,trainingK=1,isProjective=true,numOfTrainingIterations=10
public static Train ( string trainFile, string modelName ) : void
trainFile string Training file path
modelName string Model Path
return void

Train() public static method

Train the paser with train file, order is by default=1, createforest=true,trainingK=1,isProjective=true
public static Train ( string trainFile, string modelName, int numOfTrainingIterations ) : void
trainFile string Training file path
modelName string Model Path
numOfTrainingIterations int Number of iteration for training feature weights; Default=10
return void

Train() public static method

Train the paser with train file, order is by default=1, createforest=true,trainingK=1
public static Train ( string trainFile, string modelName, int numOfTrainingIterations, bool isProjective ) : void
trainFile string Training file path
modelName string Model Path
numOfTrainingIterations int Number of iteration for training feature weights; Default=10
isProjective bool Type of Parsing; Default is True; Free order languages need to be nonprojective /// True: use the projective parsing algorithm during training i.e. The Eisner algorithm /// False: use the non-projective parsing algorithm during training i.e. The Chu-Liu-Edmonds algorithm
return void

Train() public static method

Train the paser with train file, order is by default=1, createforest=true
public static Train ( string trainFile, string modelName, int numOfTrainingIterations, bool isProjective, int trainingK ) : void
trainFile string Training file path
modelName string Model Path
numOfTrainingIterations int Number of iteration for training feature weights; Default=10
isProjective bool Type of Parsing; Default is True; Free order languages need to be nonprojective /// True: use the projective parsing algorithm during training i.e. The Eisner algorithm /// False: use the non-projective parsing algorithm during training i.e. The Chu-Liu-Edmonds algorithm
trainingK int Specifies the k-best parse set size to create constraints during training /// Default is 1 /// For non-projective parsing algorithm, k-best decoding is approximate
return void

Train() public static method

Train the paser with train file, order is by default=1
public static Train ( string trainFile, string modelName, int numOfTrainingIterations, bool isProjective, int trainingK, bool createForest ) : void
trainFile string Training file path
modelName string Model Path
numOfTrainingIterations int Number of iteration for training feature weights; Default=10
isProjective bool Type of Parsing; Default is True; Free order languages need to be nonprojective /// True: use the projective parsing algorithm during training i.e. The Eisner algorithm /// False: use the non-projective parsing algorithm during training i.e. The Chu-Liu-Edmonds algorithm
trainingK int Specifies the k-best parse set size to create constraints during training /// Default is 1 /// For non-projective parsing algorithm, k-best decoding is approximate
createForest bool Default is "true" /// If create-forest is false, it will not create the training parse forest . It assumes it has been created. /// This flag is useful if you are training many models on the same data and /// features but using different Parameters (e.g. training iters, decoding type).
return void

Train() public static method

Train the paser with train file.
public static Train ( string trainFile, string modelName, int numOfTrainingIterations, bool isProjective, int trainingK, bool createForest, int order ) : void
trainFile string Training file path
modelName string Model Path
numOfTrainingIterations int Number of iteration for training feature weights; Default=10
isProjective bool Type of Parsing; Default is True; Free order languages need to be nonprojective /// True: use the projective parsing algorithm during training i.e. The Eisner algorithm /// False: use the non-projective parsing algorithm during training i.e. The Chu-Liu-Edmonds algorithm
trainingK int Specifies the k-best parse set size to create constraints during training /// Default is 1 /// For non-projective parsing algorithm, k-best decoding is approximate
createForest bool Default is "true" /// If create-forest is false, it will not create the training parse forest . It assumes it has been created. /// This flag is useful if you are training many models on the same data and /// features but using different Parameters (e.g. training iters, decoding type).
order int is either 1 or 2 /// Default is 1 /// Specifies the order/scope of features. 1 only has features over single edges /// and 2 has features over pairs of adjacent edges in the tree
return void