test/rbbt/ner/test_regexpNER.rb in rbbt-text-1.3.9 vs test/rbbt/ner/test_regexpNER.rb in rbbt-text-1.3.10

- old
+ new

@@ -86,9 +86,17 @@ matches = ner.entities(sentence) assert sentence[0..matches.first.offset-1].include?('this') end + def test_entities_named_captures + sentence = "In a sentence I should find not this but this" + + ner = RegExpNER.new({:this => /(?<who>I) should find not this but (this)/}) + matches = ner.entities(sentence) + end + + def test_regexp_order text =<<-EOF * Human AUC 0-24h= 7591 ng.h/ml at 30 mg/day In mice, dietary administration of aripiprazole at doses of 1, 3, and 10 asdf mg/kg/day for 104 weeks was associated with increased incidences of mammary tumors, namely adenocarcinomas