diff options
Diffstat (limited to 'phrase-extract/InternalStructFeature.cpp')
-rw-r--r-- | phrase-extract/InternalStructFeature.cpp | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/phrase-extract/InternalStructFeature.cpp b/phrase-extract/InternalStructFeature.cpp index 67cc186db..e0e9fd3e2 100644 --- a/phrase-extract/InternalStructFeature.cpp +++ b/phrase-extract/InternalStructFeature.cpp @@ -11,7 +11,7 @@ InternalStructFeature::InternalStructFeature() } bool InternalStructFeature::equals(const PhraseAlignment& lhs, const PhraseAlignment& rhs) const{ - cout<<"InternalStructFeature: Equals\n"; + //cout<<"InternalStructFeature: Equals\n"; //don't know what it's used for and what we should compare //-> if the dense score is the same //-> if the sparse feature is set @@ -19,7 +19,13 @@ bool InternalStructFeature::equals(const PhraseAlignment& lhs, const PhraseAlign /** Return true if the two phrase pairs are equal from the point of this feature. Assume that they already compare true according to PhraseAlignment.equals() **/ - return true; + +/* if(lhs.ghkmParse==rhs.ghkmParse) + return true; + else + return false; +*/ + //return true; } void InternalStructFeature::add(const ScoreFeatureContext& context, @@ -52,9 +58,15 @@ void InternalStructFeatureSparse::add(std::string *internalStruct, std::map<std::string,float>& sparseValues) const{ //cout<<"Sparse: "<<*internalStruct<<endl; if(internalStruct->find("VBZ")!=std::string::npos) - sparseValues["NT_VBZ"] = 1; + sparseValues["NTVBZ"] = 1; if(internalStruct->find("VBD")!=std::string::npos) - sparseValues["NT_VBD"] = 1; + sparseValues["NTVBD"] = 1; + if(internalStruct->find("VBP")!=std::string::npos) + sparseValues["NTVBP"] = 1; + if(internalStruct->find("PP")!=std::string::npos) + sparseValues["NTPP"] = 1; + if(internalStruct->find("SBAR")!=std::string::npos) + sparseValues["NTSBAR"] = 1; } |