rita icon indicating copy to clipboard operation
rita copied to clipboard

Inline pos is incorrect when the vbd and vbn of a word are the same

Open KarlieZhao opened this issue 2 years ago • 0 comments

RiTa.analyze()

let feats = RiTa.analyze("They will be remade into something else.");
expect(feats.pos).eq("prp md vb vbn in nn rb .");
// actual: "prp md vb vbd in nn rb ."

feats = RiTa.analyze("She has become a companion to a foreigner.");
expect(feats.pos).eq("prp vbz vbn dt jj to dt nn .");
// actual: "prp vbz vb dt jj to dt nn .")

RiTa.posInline()

 //'resold': as a vbd
let txt = "She resold her apartment.";
result = RiTa.posInline(txt);
answer = "She/prp resold/vbd her/prp$ apartment/nn .";
eq(result, answer);

 //'resold': as a vbn
txt = "Her apartment was resold.";
result = RiTa.posInline(txt);
answer = "Her/prp$ apartment/nn was/vbd resold/vbn .";
eq(result, answer);

lots of similar cases -- when a word's vbd and vbn are the same, one of the two tests will fail, depending on what the word's first pos tag is in the dictionary. If the first pos is 'vbd', the word will be taken as 'vbd' in both cases.

KarlieZhao avatar Jun 13 '22 10:06 KarlieZhao