diff --git a/libwccl/sentencecontext.h b/libwccl/sentencecontext.h index 6ff68a3351077c988cc6a73d7f2fd357fddee7ca..7451d78c17bacf179c454ae02af0906a1a5028f5 100644 --- a/libwccl/sentencecontext.h +++ b/libwccl/sentencecontext.h @@ -75,7 +75,7 @@ public: /// Token access convenience function - const. /// Will return NULL if the passed position is not valid in this Sentence const Corpus2::Token* at(int abs_pos) const { - if (is_current_inside()) { + if (is_inside(abs_pos)) { return get_sentence()[abs_pos]; } else { return NULL; @@ -90,7 +90,7 @@ public: /// Token access convenience function. /// Will return NULL if the passed position is not valid in this Sentence Corpus2::Token* at(int abs_pos) { - if (is_current_inside()) { + if (is_inside(abs_pos)) { return get_sentence()[abs_pos]; } else { return NULL;