Skip to content

Some key_words have multiple different clean_names #71

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

Open
wants to merge 30 commits into
base: master
Choose a base branch
from

Conversation

Drxan
Copy link

@Drxan Drxan commented Dec 20, 2018

For example:
keyword_processor = KeywordProcessor()
keyword_dict = {"news_channel": ["CNN","CCTV","BBC"],"neural_network": ["CNN", "RNN"]}
keyword_processor.add_keywords_from_dict(keyword_dict)
keyword_processor.extract_keywords('I like CNN')
we hope get result as follows:
"news_channel_|neural_network"
we can use str.split() to get real clean name as follows:
"news_channel
|neural_network".split('|_') ==> ["news_channel", "neural_network"]

vi3k6i5 and others added 30 commits November 10, 2017 20:47
added reference to flashtext paper
  `charactes` | `characters`
  `explaination` | `explanation`
  `matche` | `match`
Fix issue with incomplete keyword at the end of the sentence
Performances improvement for strings manipulations
…names

For example:
    keyword_processor = KeywordProcessor()
    keyword_dict = {"news_channel": ["CNN","CCTV","BBC"],"neural_network": ["CNN", "RNN"]}
    keyword_processor.add_keywords_from_dict(keyword_dict)
    keyword_processor.extract_keywords('I like CNN')
we hope get result as follows:
   ("news_channel", "neural_network")
For example:
    keyword_processor = KeywordProcessor()
    keyword_dict = {"news_channel": ["CNN","CCTV","BBC"],"neural_network": ["CNN", "RNN"]}
    keyword_processor.add_keywords_from_dict(keyword_dict)
    keyword_processor.extract_keywords('I like CNN')
we hope get result as follows:
   "news_channel_|_neural_network"
we can use str.split() to get real clean name as follows:
  "news_channel_|_neural_network".split('_|_') ==> ["news_channel", "neural_network"]
@coveralls
Copy link

Coverage Status

Coverage decreased (-1.4%) to 97.952% when pulling 5b4d8cd on Drxan:master into 50c45f1 on vi3k6i5:master.

2 similar comments
@coveralls
Copy link

Coverage Status

Coverage decreased (-1.4%) to 97.952% when pulling 5b4d8cd on Drxan:master into 50c45f1 on vi3k6i5:master.

@coveralls
Copy link

Coverage Status

Coverage decreased (-1.4%) to 97.952% when pulling 5b4d8cd on Drxan:master into 50c45f1 on vi3k6i5:master.

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

Successfully merging this pull request may close these issues.

6 participants