Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Loss of information strategy stopwords vs window #7

Closed
scossin opened this issue Feb 17, 2023 · 0 comments
Closed

Loss of information strategy stopwords vs window #7

scossin opened this issue Feb 17, 2023 · 0 comments

Comments

@scossin
Copy link
Owner

scossin commented Feb 17, 2023

These two matching strategies lead to a similar output:

  1. Stopwords strategy
matcher = Matcher.build(
    keywords=["cancer prostate"],
    stopwords=["de", "la"],
    w=1
)
annots = matcher.annot_text(text="cancer de la prostate")
for annot in annots:
    print(annot)
    # cancer prostate	0 6;13 21	cancer prostate
  1. Window strategy
matcher = Matcher.build(
    keywords=["cancer prostate"],
    w=3
)
annots = matcher.annot_text(text="cancer de la prostate")
for annot in annots:
    print(annot)
    # cancer prostate	0 6;13 21	cancer prostate

It can be useful to keep the information if stopwords were used in the matching strategy.
Also in 1) the words are discontinuous although the annotation can be considered as continuous, the human annotator would annotate this way: cancer de la prostate 0 21 cancer prostate.
When generating the Brat format, it's important to have the choice to include or not the stopwords.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant