clips / clips/pattern

Failing unit test test_find_keywords (pattern.text)

Open
#191 0 comments 0 reactions 1 assignee View on GitHub

Nobody has claimed this yet.

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

Description

From https://github.com/clips/pattern/commit/75e4c51b6bd98866d45e3ffd397328609a25b942 onwards, test_text.py::TestParser::test_find_keywords fails.

Specifically, according to the test case,

from pattern import text
p = text.Parser()
p.lexicon["the"] = "DT"
p.lexicon["cat"] = "NN"
p.lexicon["dog"] = "NN"
p.find_keywords("cat. dog. dog.")

should return ["dog", "cat"] but instead return ["cat", "dog"]. There were major changes introduced in https://github.com/clips/pattern/commit/75e4c51b6bd98866d45e3ffd397328609a25b942, so I'm not even totally sure if the test case is still correct.

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.