clips / clips/pattern

Oddities while parsing numbers

Open
#84 6 comments 0 reactions 1 assignee View on GitHub

@city-in-the-sky is already working on this.

Since Aug 15, 2017.

Dominant language
Python
Stars
8.9k
Forks
1.6k
PR merge metrics
No merged PRs in 30d

Description

I'm trying to parse case counts from promed articles. In some articles they are reported in a semi-structured way. e.g.

CASES: 3
DEATHS: 1

However, the counts are being parsed in unexpected ways preventing me from capturing the numeric portion.

1 is parsed correctly:

print parsetree("CASES: 1")

[Sentence('CASES/NNS/B-NP/O :/:/O/O 1/CD/O/O')]

However, some numbers are tagged as IN

print parsetree("CASES: 2")

[Sentence('CASES/NNS/B-NP/O :/:/O/O 2/IN/B-PP/O')]

This case is very strange, : 3 gets treated as a word. Is it being parsed as an emoticon?

print parsetree("CASES: 3")

[Sentence('CASES/NNS/B-NP/O :3/:/O/O')]

I haven't had any problems with two digit numbers.

print parsetree("CASES: 22")

[Sentence('CASES/NNS/B-NP/O :/:/O/O 22/CD/O/O')]

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.