diff --git a/libwccl/ops/functions/strset/getlemmas.cpp b/libwccl/ops/functions/strset/getlemmas.cpp index 750b677529c4367862745b253924c62e8a66305b..a1e9cbec7a7c258d9dbbde5f2a4bd77008a796f7 100644 --- a/libwccl/ops/functions/strset/getlemmas.cpp +++ b/libwccl/ops/functions/strset/getlemmas.cpp @@ -18,7 +18,7 @@ GetLemmas::BaseRetValPtr GetLemmas::apply_internal(const FunExecContext& context { const boost::shared_ptr<const Position>& pos = pos_expr_->apply(context); const SentenceContext& sc = context.sentence_context(); - if(pos->is_outside(sc) || !sc.is_current_inside()) { + if(pos->is_outside(sc)) { return detail::DefaultFunction<StrSet>()->apply(context); } boost::shared_ptr<StrSet> u_set = boost::make_shared<StrSet>(); diff --git a/libwccl/ops/functions/strset/getorth.cpp b/libwccl/ops/functions/strset/getorth.cpp index 666b9f345274d03253cf840cc78d636e454ca376..0fd96ea9df44a06289beda7e6b9b0d117d802421 100644 --- a/libwccl/ops/functions/strset/getorth.cpp +++ b/libwccl/ops/functions/strset/getorth.cpp @@ -18,7 +18,7 @@ GetOrth::BaseRetValPtr GetOrth::apply_internal(const FunExecContext& context) co { const boost::shared_ptr<const Position>& pos = pos_expr_->apply(context); const SentenceContext& sc = context.sentence_context(); - if(pos->is_outside(sc) || !sc.is_current_inside()) { + if(pos->is_outside(sc)) { return detail::DefaultFunction<StrSet>()->apply(context); } boost::shared_ptr<StrSet> u_set = boost::make_shared<StrSet>(); diff --git a/libwccl/ops/functions/tset/getsymbols.cpp b/libwccl/ops/functions/tset/getsymbols.cpp index 5137ca2aa3451786c087802be6fddd2c686f1763..4e4a37659ad0c402ff57902d8af2817028a62adb 100644 --- a/libwccl/ops/functions/tset/getsymbols.cpp +++ b/libwccl/ops/functions/tset/getsymbols.cpp @@ -28,7 +28,7 @@ GetSymbols::BaseRetValPtr GetSymbols::apply_internal(const FunExecContext& conte { const boost::shared_ptr<const Position>& pos = pos_expr_->apply(context); const SentenceContext& sc = context.sentence_context(); - if(pos->is_outside(sc) || !sc.is_current_inside()) { + if(pos->is_outside(sc)) { return detail::DefaultFunction<TSet>()->apply(context); } diff --git a/tests/getlemmas.cpp b/tests/getlemmas.cpp index 3c92eb2967fe76579a0cb7d1185a3cf2d3638138..568c687c677efa66161602633e23f35c2672e7e2 100644 --- a/tests/getlemmas.cpp +++ b/tests/getlemmas.cpp @@ -97,7 +97,7 @@ BOOST_FIXTURE_TEST_CASE(lemmas_begin, LemmasPredFix) sc.advance(); BOOST_CHECK(lemmas.apply(cx)->equals(first_lemmas)); sc.advance(); - BOOST_CHECK(lemmas.apply(cx)->equals(empty_set)); + BOOST_CHECK(lemmas.apply(cx)->equals(first_lemmas)); } BOOST_FIXTURE_TEST_CASE(lemmas_end, LemmasPredFix) @@ -107,7 +107,7 @@ BOOST_FIXTURE_TEST_CASE(lemmas_end, LemmasPredFix) sc.advance(); BOOST_CHECK(lemmas.apply(cx)->equals(second_lemmas)); sc.advance(); - BOOST_CHECK(lemmas.apply(cx)->equals(empty_set)); + BOOST_CHECK(lemmas.apply(cx)->equals(second_lemmas)); } BOOST_FIXTURE_TEST_CASE(lemmas_zero, LemmasPredFix) @@ -137,6 +137,8 @@ BOOST_FIXTURE_TEST_CASE(lemmas_minus_one, LemmasPredFix) sc.advance(); BOOST_CHECK(lemmas.apply(cx)->equals(first_lemmas)); sc.advance(); + BOOST_CHECK(lemmas.apply(cx)->equals(second_lemmas)); + sc.advance(); BOOST_CHECK(lemmas.apply(cx)->equals(empty_set)); } //------ to_string test cases ------- diff --git a/tests/getorth.cpp b/tests/getorth.cpp index 947e9bb5e1e16f217efb5513828079df0846ad8a..49e2b4ad71cf41e4b065c41cf91222cfaa69f359 100644 --- a/tests/getorth.cpp +++ b/tests/getorth.cpp @@ -96,7 +96,7 @@ BOOST_FIXTURE_TEST_CASE(orth_begin, OrthPredFix) sc.advance(); BOOST_CHECK(orth.apply(cx)->equals(first_orth)); sc.advance(); - BOOST_CHECK(orth.apply(cx)->equals(empty_set)); + BOOST_CHECK(orth.apply(cx)->equals(first_orth)); sc.goto_start(); } @@ -107,7 +107,7 @@ BOOST_FIXTURE_TEST_CASE(orth_end, OrthPredFix) sc.advance(); BOOST_CHECK(orth.apply(cx)->equals(second_orth)); sc.advance(); - BOOST_CHECK(orth.apply(cx)->equals(empty_set)); + BOOST_CHECK(orth.apply(cx)->equals(second_orth)); sc.goto_start(); } @@ -140,6 +140,8 @@ BOOST_FIXTURE_TEST_CASE(orth_minus_one, OrthPredFix) sc.advance(); BOOST_CHECK(orth.apply(cx)->equals(first_orth)); sc.advance(); + BOOST_CHECK(orth.apply(cx)->equals(second_orth)); + sc.advance(); BOOST_CHECK(orth.apply(cx)->equals(empty_set)); sc.goto_start(); }