Skip to content

Commit

Permalink
Fix compilation problems for paths on Linux (#33)
Browse files Browse the repository at this point in the history
Paths with attributes are now emitted for Japanese,
but there were compilation problems with Japanese paths on Linux.
  • Loading branch information
JosDenysGitHub authored and ISC-SDE committed Apr 26, 2021
1 parent 6d29cc7 commit a0c29e7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion modules/engine/src/engine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ static void iKnowEngineOutputCallback(iknow::core::IkIndexOutput* data, iknow::c
PropertyId entity_vector_prop_id = kb->PropertyIdForName(kEntityVectorTypeName);
iknowdata::Attribute a_type = static_cast<iknowdata::Attribute>(entity_vector_prop_id);

sentence_data.sent_attributes.push_back(Sent_Attribute(a_type, NULL, NULL, string())); // generate entity vector marker
sentence_data.sent_attributes.push_back(Sent_Attribute(a_type)); // generate entity vector marker
// sentence_data.sent_attributes.back().entity_ref = static_cast<unsigned short>(sentence_data.entities.size()); // connect sentence attribute to entity

for (IkSentence::EntityVector::const_iterator i = entity_vector.begin(); i != entity_vector.end(); ++i) { // collect entity id's
Expand Down
5 changes: 4 additions & 1 deletion modules/engine/src/engine.h
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,10 @@ namespace iknowdata { // to bundle all generated data
Sent_Attribute(Attribute att_type,
size_t start, size_t stop,
std::string& marker
) : type_(att_type), offset_start_(start), offset_stop_(stop), marker_(marker) {}
) : type_(att_type), offset_start_(start), offset_stop_(stop), marker_(marker), entity_ref(0) {}

Sent_Attribute(Attribute att_type) : // Entity Vector attributes, no markers, no corresponding offsets
type_(att_type), offset_start_(NULL), offset_stop_(NULL), entity_ref(0) {}

Attribute type_;
size_t offset_start_, offset_stop_; // these refer to offsets in the text, "start" is where the textual representation starts, "stop" is where it stops.
Expand Down

0 comments on commit a0c29e7

Please sign in to comment.