diff options
author | maria nadejde <maria.nadejde@gmail.com> | 2013-09-13 18:06:48 +0400 |
---|---|---|
committer | maria nadejde <maria.nadejde@gmail.com> | 2013-09-13 18:06:48 +0400 |
commit | 5615a1176625323c1bbe713ecd7e816aaa782dcc (patch) | |
tree | 4cd9ea855b507ac32eaaa96bf7062e191250b32f | |
parent | bff123635ea9773d50f8536885ba409d24175749 (diff) |
sparse feature weight file
-rw-r--r-- | GHKM_sparse_weights | 7 | ||||
-rw-r--r-- | phrase-extract/InternalStructFeature.cpp | 10 |
2 files changed, 15 insertions, 2 deletions
diff --git a/GHKM_sparse_weights b/GHKM_sparse_weights new file mode 100644 index 000000000..571952636 --- /dev/null +++ b/GHKM_sparse_weights @@ -0,0 +1,7 @@ +InternalStructFeature_NTVBZ 0.1 +InternalStructFeature_NTVBD 0.1 +InternalStructFeature_NTVBP 0.1 +InternalStructFeature_NTPP 0.1 +InternalStructFeature_NTSBAR 0.1 + + diff --git a/phrase-extract/InternalStructFeature.cpp b/phrase-extract/InternalStructFeature.cpp index 5f558f4d7..061a378b2 100644 --- a/phrase-extract/InternalStructFeature.cpp +++ b/phrase-extract/InternalStructFeature.cpp @@ -52,9 +52,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; } |