Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 3 additions & 7 deletions namedentity.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ struct WordInfo
double edge_prob() const {
return ( edge_ne + 1.0 ) / ( total + 2.0 );
}
bool operator<(const WordInfo & x) {
bool operator<(const WordInfo & x) const {
// return this->out_prob() > x.out_prob();
return this->edge_prob() > x.edge_prob();
}
Expand Down Expand Up @@ -304,7 +304,7 @@ struct Annotation
int begin;
int end;
double prob;
bool operator<(const Annotation & x) { return prob > x.prob; }
bool operator<(const Annotation & x) const { return prob > x.prob; }
Annotation(const int l, const int b, const int e, const double p) :
label(l), begin(b), end(e), prob(p) {}
};
Expand Down Expand Up @@ -395,12 +395,8 @@ void load_ne_models()
}


int netagging(vector<Token> & vt)
void netagging(vector<Token> & vt)
{

find_NEs(ne_model, vt);



}