Skip to content

Commit

Permalink
fix bug in erase space after split sentence
Browse files Browse the repository at this point in the history
  • Loading branch information
Oneplus committed Sep 4, 2013
1 parent a0dfca3 commit 107bfa6
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 44 deletions.
10 changes: 5 additions & 5 deletions conf/ltp.cnf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
segmentor-model = new_ltp_data/cws.model
postagger-model = new_ltp_data/pos.model
parser-model = new_ltp_data/parser.model
ner-model = new_ltp_data/ne_data
srl-data = new_ltp_data/srl/
segmentor-model = ltp_data/cws.model
postagger-model = ltp_data/pos.model
parser-model = ltp_data/parser.model
ner-model = ltp_data/ner.model
srl-data = ltp_data/srl/
5 changes: 0 additions & 5 deletions conf/ltp_all_modules.conf.in

This file was deleted.

16 changes: 6 additions & 10 deletions src/_split_sentence/SplitSentence.cpp
Original file line number Diff line number Diff line change
@@ -1,21 +1,17 @@
#include "SplitSentence.h"
//#include "SentenceIterator.h"
#include <string.h>
#include "strutils.hpp"
#include "sentsplit.hpp"

//using namespace util;

int SplitSentence( const std::string& strPara, std::vector<std::string>& vecSentence ) {
ltp::Chinese::split_sentence(strPara, vecSentence);
/*StringReader sr( strPara.c_str() );
Separator sep;
sentence_iterator si(&sr, sep), send;
vecSentence.clear();
while( si != send ) {
if(strlen(*si) < 400){
vecSentence.push_back( *si );
}
si++;
}*/

for (int i = 0; i < vecSentence.size(); ++ i) {
vecSentence[i] = ltp::strutils::chomp(vecSentence[i]);
}

return 1;
}
3 changes: 2 additions & 1 deletion src/_split_sentence/SplitSentence.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@
// return (int)vecSentence.size();
int SplitSentence( const std::string& strPara, std::vector<std::string>& vecSentence );

#endif //__SPLIT_SENTENCE_H__
#endif //__SPLIT_SENTENCE_H__

23 changes: 0 additions & 23 deletions tools/testing/auto-test.sh.in

This file was deleted.

0 comments on commit 107bfa6

Please sign in to comment.