C# Class MSTParser.DependencyPipe

Show file Open project: rasoolims/MSTParserCSharp Class Usage Examples

Public Properties

Property Type Description
CreateForest bool
DataAlphabet Alphabet
Labeled bool
TypeAlphabet Alphabet
Types string[]
TypesInt int[]

Public Methods

Method Description
Add ( string feat, double val, FeatureVector fv ) : void
AddNewFeature ( int index, double val, FeatureVector fv ) : void
CloseAlphabets ( ) : void
CreateFeatureVector ( string toks, string pos, string labs, int deps ) : FeatureVector
CreateFeatureVector ( string toks, string pos, string posA, int small, int large, bool attR, FeatureVector fv ) : FeatureVector
CreateFeatureVector ( string toks, string pos, string posA, int word, string type, bool attR, bool childFeatures, FeatureVector fv ) : FeatureVector
CreateInstance ( StreamReader reader ) : DependencyInstance
CreateInstance ( string &toks, string &pos, string &labs, int &deps ) : DependencyInstance
CreateInstances ( string fileName, string featFileName ) : DependencyInstance[]
DependencyPipe ( ) : System
DependencyPipe ( bool createForest ) : System

Initializes a new instance of the DependencyPipe class.

GetFeatureVector ( DependencyInstance inst, FeatureVector fvs, double probs, FeatureVector ntFvs, double ntProbs, Parameters parameters ) : void
Normalize ( string s ) : string
ReadFeatureVector ( BinaryReader reader, DependencyInstance inst, FeatureVector fvs, double probs, FeatureVector ntFvs, double ntProbs, Parameters parameters ) : DependencyInstance
ReadLines ( StreamReader reader ) : string[][]
ReadLines ( string &toks, string &pos, string &labels, int &deps ) : void
SetLabeled ( string file ) : void
WritePossibleFeatures ( DependencyInstance inst, BinaryWriter writer ) : void
setLabel ( bool label ) : void

Private Methods

Method Description
CreateAlphabet ( string file ) : void

Method Details

Add() public method

public Add ( string feat, double val, FeatureVector fv ) : void
feat string
val double
fv FeatureVector
return void

AddNewFeature() public method

public AddNewFeature ( int index, double val, FeatureVector fv ) : void
index int
val double
fv FeatureVector
return void

CloseAlphabets() public method

public CloseAlphabets ( ) : void
return void

CreateFeatureVector() public method

public CreateFeatureVector ( string toks, string pos, string labs, int deps ) : FeatureVector
toks string
pos string
labs string
deps int
return FeatureVector

CreateFeatureVector() public method

public CreateFeatureVector ( string toks, string pos, string posA, int small, int large, bool attR, FeatureVector fv ) : FeatureVector
toks string
pos string
posA string
small int
large int
attR bool
fv FeatureVector
return FeatureVector

CreateFeatureVector() public method

public CreateFeatureVector ( string toks, string pos, string posA, int word, string type, bool attR, bool childFeatures, FeatureVector fv ) : FeatureVector
toks string
pos string
posA string
word int
type string
attR bool
childFeatures bool
fv FeatureVector
return FeatureVector

CreateInstance() public method

public CreateInstance ( StreamReader reader ) : DependencyInstance
reader System.IO.StreamReader
return DependencyInstance

CreateInstance() public method

public CreateInstance ( string &toks, string &pos, string &labs, int &deps ) : DependencyInstance
toks string
pos string
labs string
deps int
return DependencyInstance

CreateInstances() public method

public CreateInstances ( string fileName, string featFileName ) : DependencyInstance[]
fileName string
featFileName string
return DependencyInstance[]

DependencyPipe() public method

public DependencyPipe ( ) : System
return System

DependencyPipe() public method

Initializes a new instance of the DependencyPipe class.
public DependencyPipe ( bool createForest ) : System
createForest bool if set to true [create forest].
return System

GetFeatureVector() public method

public GetFeatureVector ( DependencyInstance inst, FeatureVector fvs, double probs, FeatureVector ntFvs, double ntProbs, Parameters parameters ) : void
inst DependencyInstance
fvs FeatureVector
probs double
ntFvs FeatureVector
ntProbs double
parameters Parameters
return void

Normalize() public method

public Normalize ( string s ) : string
s string
return string

ReadFeatureVector() public method

public ReadFeatureVector ( BinaryReader reader, DependencyInstance inst, FeatureVector fvs, double probs, FeatureVector ntFvs, double ntProbs, Parameters parameters ) : DependencyInstance
reader BinaryReader
inst DependencyInstance
fvs FeatureVector
probs double
ntFvs FeatureVector
ntProbs double
parameters Parameters
return DependencyInstance

ReadLines() public method

public ReadLines ( StreamReader reader ) : string[][]
reader StreamReader
return string[][]

ReadLines() public method

public ReadLines ( string &toks, string &pos, string &labels, int &deps ) : void
toks string
pos string
labels string
deps int
return void

SetLabeled() public method

public SetLabeled ( string file ) : void
file string
return void

WritePossibleFeatures() public method

public WritePossibleFeatures ( DependencyInstance inst, BinaryWriter writer ) : void
inst DependencyInstance
writer BinaryWriter
return void

setLabel() public method

public setLabel ( bool label ) : void
label bool
return void

Property Details

CreateForest public property

public bool CreateForest
return bool

DataAlphabet public property

public Alphabet DataAlphabet
return Alphabet

Labeled public property

public bool Labeled
return bool

TypeAlphabet public property

public Alphabet TypeAlphabet
return Alphabet

Types public property

public string[] Types
return string[]

TypesInt public property

public int[] TypesInt
return int[]