Skip to content

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

@KarlieZhao

Description

@KarlieZhao

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.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions