Code Monkey home page Code Monkey logo

ovos-classifiers's Introduction

OVOS Classifiers

WIP - open during construction, pre-alpha

built on top of nltk and scikit-learn

  • provide baseline feature extraction pipelines suited for each task
  • provide user facing classes for each NLP task needed in the OVOS ecosystem
    • transparently load different models (model_path or external plugin)
  • provide dataset loaders suited for each of those tasks per language
  • provide baseline heuristic implementation for each task per language
    • replaces ovos-lingua-franca
  • provide baseline implementations and benchmarks using classical nltk and scikit-learn algorithms
    • minimum viable implementation to ensure lang support

Usage

see scripts/training for training scripts

Module Structure

  • datasets - dataset downloaders and loaders
    • tagsets - postag tagset conversion
    • wordnet - helpers to interact with Wordnet
  • heuristics - implement solutions to common NLP problems without any machine learning
    • corefiob - coreference resolution
    • inflection - pluralization / singularization
    • keyword_extraction - extract keywords from text
    • lang_detect - language classifier
    • machine_comprehension - question answering (query + passage)
    • normalize - text normalization
    • numeric - extract numbers from text
    • phonemizer - text 2 ARPA phonemes
    • postag - regex postag + nltk default postag wrapper
    • summarization - text summarization
    • time - date / time / duration extraction from text
    • tokenize - tokenization utilities
    • utttags - question classifier
  • opm - plugins for models trained with this package
    • heuristics - plugins using implementations from heuristics module
    • nltk - plugins built with nltk
  • skovos - scikit learn based classifiers
    • features - feature extraction utilities
      • en - english specific
      • pt - portuguese specific
    • classifier - classification models
    • nn - neural network (MultiLayerPerceptron) models
    • pipelines - ready to use pipelines for classifier training
    • tagger - utterance tokens tagging models
  • tasks - base classes for solving NLP problems
    • classifier - classify text
    • tagger - tag utterance tokens
  • utils - misc utilities
  • corefiob - coreference resolution entrypoint (ovos-config aware)
  • postag - postag entrypoint (ovos-config aware)
  • utttags - question classification entrypoint (ovos-config aware)

Plugins

plugins for models trained with this package

these plugins use the best available model per language out of the box, take into account global ovos-config

implements: normalization, coreference solver, postag

from ovos_classifiers.opm import OVOSPostagPlugin, OVOSCoreferenceSolverPlugin, UtteranceNormalizerPlugin, CoreferenceNormalizerPlugin

 print(OVOSPostagPlugin().postag("I like pizza", "en"))
# [(0, 1, 'I', 'PRON'), (2, 6, 'like', 'VERB'), (7, 12, 'pizza', 'NOUN')]

coref = OVOSCoreferenceSolverPlugin()
print(coref.solve_corefs("Mom is awesome, she said she loves me!", "en"))

u, _ = UtteranceNormalizerPlugin().transform(["Mom is awesome, she said she loves me!"])
print(u)
# ['Mom is awesome, she said she loves me!', 'Mom is awesome , she said she loves me']
u, _ = CoreferenceNormalizerPlugin().transform(u)  #
print(u)
# ['Mom is awesome , Mom said Mom loves me', 'Mom is awesome, she said she loves me!', 'Mom is awesome , she said she loves me']

plugins implemented with nltk

implements: keyword extraction, question answering, postag

from ovos_classifiers.opm.nltk import NltkPostagPlugin, RakeExtractorPlugin, WordnetSolverPlugin

print(NltkPostagPlugin().postag("I like pizza", "en"))
# [(0, 1, 'I', 'PRON'), (2, 6, 'like', 'VERB'), (7, 12, 'pizza', 'NOUN')]

k = RakeExtractorPlugin()
k.extract("who invented the telephone", "en")  # {'telephone': 0.5, 'invented': 0.5}
k.extract("what is the speed of light", "en")  # {'speed': 0.5, 'light': 0.5}

d = WordnetSolverPlugin()
sentence = d.spoken_answer("what is the definition of computer")
print(sentence)
# a machine for performing calculations automatically

d = WordnetSolverPlugin()
sentence = d.spoken_answer("qual é a definição de computador", lang="pt")
print(sentence)
# uma máquina para realizar cálculos automaticamente

heuristics based plugins

implements: keyword extraction, question answering, summarization

from ovos_classifiers.opm.heuristics import HeuristicKeywordExtractorPlugin, BM25SolverPlugin, HeuristicSummarizerPlugin

k = HeuristicKeywordExtractorPlugin()
k.extract("who invented the telephone", "en")  # {'telephone': 1.0}
k.extract("what is the speed of light", "en")  # {'speed of light': 1.0}


doc = """
Introducing OpenVoiceOS - The Free and Open-Source Personal Assistant and Smart Speaker.

OpenVoiceOS is a new player in the smart speaker market, offering a powerful and flexible alternative to proprietary solutions like Amazon Echo and Google Home.

With OpenVoiceOS, you have complete control over your personal data and the ability to customize and extend the functionality of your smart speaker.

Built on open-source software, OpenVoiceOS is designed to provide users with a seamless and intuitive voice interface for controlling their smart home devices, playing music, setting reminders, and much more.

The platform leverages cutting-edge technology, including machine learning and natural language processing, to deliver a highly responsive and accurate experience.

In addition to its voice capabilities, OpenVoiceOS features a touch-screen GUI made using QT5 and the KF5 framework.

The GUI provides an intuitive, user-friendly interface that allows you to access the full range of OpenVoiceOS features and functionality.

Whether you prefer voice commands or a more traditional touch interface, OpenVoiceOS has you covered.

One of the key advantages of OpenVoiceOS is its open-source nature, which means that anyone with the technical skills can contribute to the platform and help shape its future.

Whether you're a software developer, data scientist, or just someone with a passion for technology, you can get involved and help build the next generation of personal assistants and smart speakers.

With OpenVoiceOS, you have the option to run the platform fully offline, giving you complete control over your data and ensuring that your information is never shared with third parties. This makes OpenVoiceOS the perfect choice for anyone who values privacy and security.

So if you're looking for a personal assistant and smart speaker that gives you the freedom and control you deserve, be sure to check out OpenVoiceOS today!
"""

b = BM25SolverPlugin()
print(b.get_best_passage(doc, "does OpenVoiceOS run offline"))
# With OpenVoiceOS , you have the option to run the platform fully offline , giving you complete control over your data and ensuring that your information is never shared with third parties .

h = HeuristicSummarizerPlugin()
print(h.tldr(doc, lang="en"))
#     Built on open-source software, OpenVoiceOS is designed to provide users with a seamless and intuitive voice interface for controlling their smart home devices, playing music, setting reminders, and much more.
#     Whether you're a software developer, data scientist, or just someone with a passion for technology, you can get involved and help build the next generation of personal assistants and smart speakers.
#     With OpenVoiceOS, you have complete control over your personal data and the ability to customize and extend the functionality of your smart speaker.
#     With OpenVoiceOS, you have the option to run the platform fully offline, giving you complete control over your data and ensuring that your information is never shared with third parties.
#     So if you're looking for a personal assistant and smart speaker that gives you the freedom and control you deserve, be sure to check out OpenVoiceOS today!
#     One of the key advantages of OpenVoiceOS is its open-source nature, which means that anyone with the technical skills can contribute to the platform and help shape its future.
#     OpenVoiceOS is a new player in the smart speaker market, offering a powerful and flexible alternative to proprietary solutions like Amazon Echo and Google Home.

ovos-classifiers's People

Contributors

emphasize avatar jarbasal avatar jeffmeisterj avatar neondaniel avatar neonjarbas avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

ovos-classifiers's Issues

Hide nltk_data log when "log_level" is set to " INFO

[nltk_data] Downloading package punkt to
[nltk_data]     /Users/goldyfruit/nltk_data...
[nltk_data]   Package punkt is already up-to-date!
[nltk_data] Downloading package averaged_perceptron_tagger to
[nltk_data]     /Users/goldyfruit/nltk_data...
[nltk_data]   Package averaged_perceptron_tagger is already up-to-
[nltk_data]       date!
[nltk_data] Downloading package universal_tagset to
[nltk_data]     /Users/goldyfruit/nltk_data...
[nltk_data]   Package universal_tagset is already up-to-date!

inflection/ordinalize

return "{}{}".format(number, self.ordinal(number))

The way it is coded, this only adds a given suffix. But i'm not clear about the usage. Is the input strictly int? Should it (in the end) also format spoken numbers?

In case of formatting, in german sometimes the "number" itself changes.
How should this be covered? I could make it as easy as with en to just let subsequent services figure stuff out
(by only adding a point - ie. 1., but i'm hesitant to do that

1: "eins" -> "erst(e/er)" (f/m)


Besides, and to make things worse the rule above is also broken if a direct article precedes

der (m) erste (f) Monat (m)
die (f) zweite (f) Zahl (f)

and going all in, it is also reliant on the case (in combination with the nouns gender)
(genitive)
des ersten Monats (m)
der zweiten Sprache (f)

sklearn models

I have doubts on the way sklearn models were trained. The only "feature" is the word itself, devoid of any contextual specification.

I've seen additional features extracted here

Features, i.e. X[n]

{'capitals_inside': False,
 'has_hyphen': False,
 'is_all_caps': False,
 'is_all_lower': True,
 'is_capitalized': False,
 'is_first': False,
 'is_last': False,
 'is_numeric': False,
 'next_word': 'sentence',
 'prefix-1': 'a',
 'prefix-2': 'a',
 'prefix-3': 'a',
 'prev_word': 'is',
 'suffix-1': 'a',
 'suffix-2': 'a',
 'suffix-3': 'a',
 'word': 'a'}
def features(sentence, index):
   """ sentence: [w1, w2, ...], index: the index of the word """
   return {
       'word': sentence[index],
       'is_first': index == 0,
       'is_last': index == len(sentence) - 1,
       'is_capitalized': sentence[index][0].upper() == sentence[index][0],
       'is_all_caps': sentence[index].upper() == sentence[index],
       'is_all_lower': sentence[index].lower() == sentence[index],
       'prefix-1': sentence[index][0],
       'prefix-2': sentence[index][:2],
       'prefix-3': sentence[index][:3],
       'suffix-1': sentence[index][-1],
       'suffix-2': sentence[index][-2:],
       'suffix-3': sentence[index][-3:],
       'prev_word': '' if index == 0 else sentence[index - 1],
       'next_word': '' if index == len(sentence) - 1 else sentence[index + 1],
       'has_hyphen': '-' in sentence[index],
       'is_numeric': sentence[index].isdigit(),
       'capitals_inside': sentence[index][1:].lower() != sentence[index][1:]
   }

The lack of context and the minimal train data size should make those models perform poorly in production

multiple choice solvers - ask selection/yesno

  • create a MultipleChoiceSolver for ask_yesno under ovos-classifiers (port from lingua-franca)
  • create a MultipleChoiceSolver for ask_selection under ovos-classifiers (port from ovos-workshop)
  • add these solvers to ovos-config as defaults
  • adopt new solvers in ovos-workshop

*note, solvers have auto translate capabilities, so we can use the english only heuristics even in unsupported languages until they are implemented

those are the 2 main advantages of doing it this way, automatic lang support + pluginification

ask_selection/yesno basically falls in the realm of https://github.com/OpenVoiceOS/ovos-plugin-manager/blob/dev/ovos_plugin_manager/templates/solvers.py#L309

ask yesno here https://github.com/OpenVoiceOS/ovos-lingua-franca/blob/dev/lingua_franca/parse.py#L121

ask selection here https://github.com/OpenVoiceOS/OVOS-workshop/blob/dev/ovos_workshop/skills/ovos.py#L1915

Missing downloads when using different languages than English

Nov 23 08:58:03 rpi3b ovos-core[3093]: 2023-11-23 08:58:03.320 - skill-ovos-wikipedia.openvoiceos - ERROR -
Nov 23 08:58:03 rpi3b ovos-core[3093]: **********************************************************************
Nov 23 08:58:03 rpi3b ovos-core[3093]:   Resource punkt not found.
Nov 23 08:58:03 rpi3b ovos-core[3093]:   Please use the NLTK Downloader to obtain the resource:
Nov 23 08:58:03 rpi3b ovos-core[3093]:   >>> import nltk
Nov 23 08:58:03 rpi3b ovos-core[3093]:   >>> nltk.download('punkt')
Nov 23 08:58:03 rpi3b ovos-core[3093]:   
Nov 23 08:58:03 rpi3b ovos-core[3093]:   For more information see: https://www.nltk.org/data.html
Nov 23 08:58:03 rpi3b ovos-core[3093]:   Attempted to load tokenizers/punkt/PY3/english.pickle
Nov 23 08:58:03 rpi3b ovos-core[3093]:   Searched in:
Nov 23 08:58:03 rpi3b ovos-core[3093]:     - '/home/goldyfruit/nltk_data'
Nov 23 08:58:03 rpi3b ovos-core[3093]:     - '/home/goldyfruit/.venvs/ovos/nltk_data'
Nov 23 08:58:03 rpi3b ovos-core[3093]:     - '/home/goldyfruit/.venvs/ovos/share/nltk_data'
Nov 23 08:58:03 rpi3b ovos-core[3093]:     - '/home/goldyfruit/.venvs/ovos/lib/nltk_data'
Nov 23 08:58:03 rpi3b ovos-core[3093]:     - '/usr/share/nltk_data'
Nov 23 08:58:03 rpi3b ovos-core[3093]:     - '/usr/local/share/nltk_data'
Nov 23 08:58:03 rpi3b ovos-core[3093]:     - '/usr/lib/nltk_data'
Nov 23 08:58:03 rpi3b ovos-core[3093]:     - '/usr/local/lib/nltk_data'
Nov 23 08:58:03 rpi3b ovos-core[3093]:     - ''
Nov 23 08:58:03 rpi3b ovos-core[3093]: **********************************************************************
Nov 23 08:58:03 rpi3b ovos-core[3093]: 2023-11-23 08:58:03.327 - skills - ovos_workshop.skills.common_query_skill:__get_cq:160 - ERROR - error matching C'est quoi un reptile with skill-ovos-wikipedia.openvoiceos
Nov 23 08:58:03 rpi3b ovos-core[3093]: Traceback (most recent call last):
Nov 23 08:58:03 rpi3b ovos-core[3093]:   File "/home/goldyfruit/.venvs/ovos/lib/python3.11/site-packages/ovos_workshop/skills/common_query_skill.py", line 158, in __get_cq
Nov 23 08:58:03 rpi3b ovos-core[3093]:     result = self.CQS_match_query_phrase(search_phrase)
Nov 23 08:58:03 rpi3b ovos-core[3093]:              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Nov 23 08:58:03 rpi3b ovos-core[3093]:   File "/home/goldyfruit/.venvs/ovos/lib/python3.11/site-packages/skill_ovos_wikipedia/__init__.py", line 201, in CQS_match_query_phrase
Nov 23 08:58:03 rpi3b ovos-core[3093]:     title, summary = self.ask_the_wiki(phrase)
Nov 23 08:58:03 rpi3b ovos-core[3093]:                      ^^^^^^^^^^^^^^^^^^^^^^^^^
Nov 23 08:58:03 rpi3b ovos-core[3093]:   File "/home/goldyfruit/.venvs/ovos/lib/python3.11/site-packages/skill_ovos_wikipedia/__init__.py", line 227, in ask_the_wiki
Nov 23 08:58:03 rpi3b ovos-core[3093]:     self.image = self.wiki.get_image(query)
Nov 23 08:58:03 rpi3b ovos-core[3093]:                  ^^^^^^^^^^^^^^^^^^^^^^^^^^
Nov 23 08:58:03 rpi3b ovos-core[3093]:   File "/home/goldyfruit/.venvs/ovos/lib/python3.11/site-packages/skill_ovos_wikipedia/__init__.py", line 100, in get_image
Nov 23 08:58:03 rpi3b ovos-core[3093]:     data = self.extract_and_search(query, context)
Nov 23 08:58:03 rpi3b ovos-core[3093]:            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Nov 23 08:58:03 rpi3b ovos-core[3093]:   File "/home/goldyfruit/.venvs/ovos/lib/python3.11/site-packages/skill_ovos_wikipedia/__init__.py", line 55, in extract_and_search
Nov 23 08:58:03 rpi3b ovos-core[3093]:     query = self.extract_keyword(query, lang)
Nov 23 08:58:03 rpi3b ovos-core[3093]:             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Nov 23 08:58:03 rpi3b ovos-core[3093]:   File "/home/goldyfruit/.venvs/ovos/lib/python3.11/site-packages/skill_ovos_wikipedia/__init__.py", line 39, in extract_keyword
Nov 23 08:58:03 rpi3b ovos-core[3093]:     return keyword_extractor.extract_subject(query, lang)
Nov 23 08:58:03 rpi3b ovos-core[3093]:            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Nov 23 08:58:03 rpi3b ovos-core[3093]:   File "/home/goldyfruit/.venvs/ovos/lib/python3.11/site-packages/ovos_classifiers/heuristics/keyword_extraction.py", line 58, in extract_subject
Nov 23 08:58:03 rpi3b ovos-core[3093]:     tagged_tokens = NltkPostag().tag(query)
Nov 23 08:58:03 rpi3b ovos-core[3093]:                     ^^^^^^^^^^^^^^^^^^^^^^^
Nov 23 08:58:03 rpi3b ovos-core[3093]:   File "/home/goldyfruit/.venvs/ovos/lib/python3.11/site-packages/ovos_classifiers/heuristics/postag.py", line 149, in tag
Nov 23 08:58:03 rpi3b ovos-core[3093]:     sentence = nltk.word_tokenize(sentence)
Nov 23 08:58:03 rpi3b ovos-core[3093]:                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Nov 23 08:58:03 rpi3b ovos-core[3093]:   File "/home/goldyfruit/.venvs/ovos/lib/python3.11/site-packages/nltk/tokenize/__init__.py", line 129, in word_tokenize
Nov 23 08:58:03 rpi3b ovos-core[3093]:     sentences = [text] if preserve_line else sent_tokenize(text, language)
Nov 23 08:58:03 rpi3b ovos-core[3093]:                                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Nov 23 08:58:03 rpi3b ovos-core[3093]:   File "/home/goldyfruit/.venvs/ovos/lib/python3.11/site-packages/nltk/tokenize/__init__.py", line 106, in sent_tokenize
Nov 23 08:58:03 rpi3b ovos-core[3093]:     tokenizer = load(f"tokenizers/punkt/{language}.pickle")
Nov 23 08:58:03 rpi3b ovos-core[3093]:                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Nov 23 08:58:03 rpi3b ovos-core[3093]:   File "/home/goldyfruit/.venvs/ovos/lib/python3.11/site-packages/nltk/data.py", line 750, in load
Nov 23 08:58:03 rpi3b ovos-core[3093]:     opened_resource = _open(resource_url)
Nov 23 08:58:03 rpi3b ovos-core[3093]:                       ^^^^^^^^^^^^^^^^^^^
Nov 23 08:58:03 rpi3b ovos-core[3093]:   File "/home/goldyfruit/.venvs/ovos/lib/python3.11/site-packages/nltk/data.py", line 876, in _open
Nov 23 08:58:03 rpi3b ovos-core[3093]:     return find(path_, path + [""]).open()
Nov 23 08:58:03 rpi3b ovos-core[3093]:            ^^^^^^^^^^^^^^^^^^^^^^^^
Nov 23 08:58:03 rpi3b ovos-core[3093]:   File "/home/goldyfruit/.venvs/ovos/lib/python3.11/site-packages/nltk/data.py", line 583, in find
Nov 23 08:58:03 rpi3b ovos-core[3093]:     raise LookupError(resource_not_found)
Nov 23 08:58:03 rpi3b ovos-core[3093]: LookupError:
Nov 23 08:58:03 rpi3b ovos-core[3093]: **********************************************************************
Nov 23 08:58:03 rpi3b ovos-core[3093]:   Resource punkt not found.
Nov 23 08:58:03 rpi3b ovos-core[3093]:   Please use the NLTK Downloader to obtain the resource:
Nov 23 08:58:03 rpi3b ovos-core[3093]:   >>> import nltk
Nov 23 08:58:03 rpi3b ovos-core[3093]:   >>> nltk.download('punkt')
Nov 23 08:58:03 rpi3b ovos-core[3093]:   
Nov 23 08:58:03 rpi3b ovos-core[3093]:   For more information see: https://www.nltk.org/data.html
Nov 23 08:58:03 rpi3b ovos-core[3093]:   Attempted to load tokenizers/punkt/PY3/english.pickle
Nov 23 08:58:03 rpi3b ovos-core[3093]:   Searched in:
Nov 23 08:58:03 rpi3b ovos-core[3093]:     - '/home/goldyfruit/nltk_data'
Nov 23 08:58:03 rpi3b ovos-core[3093]:     - '/home/goldyfruit/.venvs/ovos/nltk_data'
Nov 23 08:58:03 rpi3b ovos-core[3093]:     - '/home/goldyfruit/.venvs/ovos/share/nltk_data'
Nov 23 08:58:03 rpi3b ovos-core[3093]:     - '/home/goldyfruit/.venvs/ovos/lib/nltk_data'
Nov 23 08:58:03 rpi3b ovos-core[3093]:     - '/usr/share/nltk_data'
Nov 23 08:58:03 rpi3b ovos-core[3093]:     - '/usr/local/share/nltk_data'
Nov 23 08:58:03 rpi3b ovos-core[3093]:     - '/usr/lib/nltk_data'
Nov 23 08:58:03 rpi3b ovos-core[3093]:     - '/usr/local/lib/nltk_data'
Nov 23 08:58:03 rpi3b ovos-core[3093]:     - ''
Nov 23 08:58:03 rpi3b ovos-core[3093]: **********************************************************************

In order to fix the issue, I have to download manually the files.

nltk.download('punkt')
nltk.download('averaged_perceptron_tagger')
nltk.download('universal_tagset')

Resource punkt not found.

ovos-skills-7f546bd6ff-h4kp9 ovos-skill-wikipedia 2024-01-03 20:48:24.482 - skill-ovos-wikipedia.openvoiceos - ERROR - 
ovos-skills-7f546bd6ff-h4kp9 ovos-skill-wikipedia **********************************************************************
ovos-skills-7f546bd6ff-h4kp9 ovos-skill-wikipedia   Resource punkt not found.
ovos-skills-7f546bd6ff-h4kp9 ovos-skill-wikipedia   Please use the NLTK Downloader to obtain the resource:
ovos-skills-7f546bd6ff-h4kp9 ovos-skill-wikipedia 
ovos-skills-7f546bd6ff-h4kp9 ovos-skill-wikipedia   >>> import nltk
ovos-skills-7f546bd6ff-h4kp9 ovos-skill-wikipedia   >>> nltk.download('punkt')
ovos-skills-7f546bd6ff-h4kp9 ovos-skill-wikipedia   
ovos-skills-7f546bd6ff-h4kp9 ovos-skill-wikipedia   For more information see: https://www.nltk.org/data.html
ovos-skills-7f546bd6ff-h4kp9 ovos-skill-wikipedia 
ovos-skills-7f546bd6ff-h4kp9 ovos-skill-wikipedia   Attempted to load tokenizers/punkt/PY3/english.pickle
ovos-skills-7f546bd6ff-h4kp9 ovos-skill-wikipedia 
ovos-skills-7f546bd6ff-h4kp9 ovos-skill-wikipedia   Searched in:
ovos-skills-7f546bd6ff-h4kp9 ovos-skill-wikipedia     - '/home/ovos/nltk_data'
ovos-skills-7f546bd6ff-h4kp9 ovos-skill-wikipedia     - '/home/ovos/.venv/nltk_data'
ovos-skills-7f546bd6ff-h4kp9 ovos-skill-wikipedia     - '/home/ovos/.venv/share/nltk_data'
ovos-skills-7f546bd6ff-h4kp9 ovos-skill-wikipedia     - '/home/ovos/.venv/lib/nltk_data'
ovos-skills-7f546bd6ff-h4kp9 ovos-skill-wikipedia     - '/usr/share/nltk_data'
ovos-skills-7f546bd6ff-h4kp9 ovos-skill-wikipedia     - '/usr/local/share/nltk_data'
ovos-skills-7f546bd6ff-h4kp9 ovos-skill-wikipedia     - '/usr/lib/nltk_data'
ovos-skills-7f546bd6ff-h4kp9 ovos-skill-wikipedia     - '/usr/local/lib/nltk_data'
ovos-skills-7f546bd6ff-h4kp9 ovos-skill-wikipedia     - ''
ovos-skills-7f546bd6ff-h4kp9 ovos-skill-wikipedia **********************************************************************
ovos-skills-7f546bd6ff-h4kp9 ovos-skill-wikipedia 
ovos-skills-7f546bd6ff-h4kp9 ovos-skill-wikipedia 2024-01-03 20:48:24.492 - OVOS - ovos_workshop.skills.common_query_skill:__get_cq:160 - ERROR - error matching explain me Quantum computing with skill-ovos-wikipedia.openvoiceos
ovos-skills-7f546bd6ff-h4kp9 ovos-skill-wikipedia Traceback (most recent call last):
ovos-skills-7f546bd6ff-h4kp9 ovos-skill-wikipedia   File "/home/ovos/.venv/lib/python3.11/site-packages/ovos_workshop/skills/common_query_skill.py", line 158, in __get_cq
ovos-skills-7f546bd6ff-h4kp9 ovos-skill-wikipedia     result = self.CQS_match_query_phrase(search_phrase)
ovos-skills-7f546bd6ff-h4kp9 ovos-skill-wikipedia              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ovos-skills-7f546bd6ff-h4kp9 ovos-skill-wikipedia   File "/home/ovos/.venv/lib/python3.11/site-packages/skill_ovos_wikipedia/__init__.py", line 201, in CQS_match_query_phrase
ovos-skills-7f546bd6ff-h4kp9 ovos-skill-wikipedia     title, summary = self.ask_the_wiki(phrase)
ovos-skills-7f546bd6ff-h4kp9 ovos-skill-wikipedia                      ^^^^^^^^^^^^^^^^^^^^^^^^^
ovos-skills-7f546bd6ff-h4kp9 ovos-skill-wikipedia   File "/home/ovos/.venv/lib/python3.11/site-packages/skill_ovos_wikipedia/__init__.py", line 227, in ask_the_wiki
ovos-skills-7f546bd6ff-h4kp9 ovos-skill-wikipedia     self.image = self.wiki.get_image(query)
ovos-skills-7f546bd6ff-h4kp9 ovos-skill-wikipedia                  ^^^^^^^^^^^^^^^^^^^^^^^^^^
ovos-skills-7f546bd6ff-h4kp9 ovos-skill-wikipedia   File "/home/ovos/.venv/lib/python3.11/site-packages/skill_ovos_wikipedia/__init__.py", line 100, in get_image
ovos-skills-7f546bd6ff-h4kp9 ovos-skill-wikipedia     data = self.extract_and_search(query, context)
ovos-skills-7f546bd6ff-h4kp9 ovos-skill-wikipedia            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ovos-skills-7f546bd6ff-h4kp9 ovos-skill-wikipedia   File "/home/ovos/.venv/lib/python3.11/site-packages/skill_ovos_wikipedia/__init__.py", line 55, in extract_and_search
ovos-skills-7f546bd6ff-h4kp9 ovos-skill-wikipedia     query = self.extract_keyword(query, lang)
ovos-skills-7f546bd6ff-h4kp9 ovos-skill-wikipedia             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ovos-skills-7f546bd6ff-h4kp9 ovos-skill-wikipedia   File "/home/ovos/.venv/lib/python3.11/site-packages/skill_ovos_wikipedia/__init__.py", line 39, in extract_keyword
ovos-skills-7f546bd6ff-h4kp9 ovos-skill-wikipedia     return keyword_extractor.extract_subject(query, lang)
ovos-skills-7f546bd6ff-h4kp9 ovos-skill-wikipedia            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ovos-skills-7f546bd6ff-h4kp9 ovos-skill-wikipedia   File "/home/ovos/.venv/lib/python3.11/site-packages/ovos_classifiers/heuristics/keyword_extraction.py", line 58, in extract_subject
ovos-skills-7f546bd6ff-h4kp9 ovos-skill-wikipedia     tagged_tokens = NltkPostag().tag(query)
ovos-skills-7f546bd6ff-h4kp9 ovos-skill-wikipedia                     ^^^^^^^^^^^^^^^^^^^^^^^
ovos-skills-7f546bd6ff-h4kp9 ovos-skill-wikipedia   File "/home/ovos/.venv/lib/python3.11/site-packages/ovos_classifiers/heuristics/postag.py", line 149, in tag
ovos-skills-7f546bd6ff-h4kp9 ovos-skill-wikipedia     sentence = nltk.word_tokenize(sentence)
ovos-skills-7f546bd6ff-h4kp9 ovos-skill-wikipedia                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ovos-skills-7f546bd6ff-h4kp9 ovos-skill-wikipedia   File "/home/ovos/.venv/lib/python3.11/site-packages/nltk/tokenize/__init__.py", line 129, in word_tokenize
ovos-skills-7f546bd6ff-h4kp9 ovos-skill-wikipedia     sentences = [text] if preserve_line else sent_tokenize(text, language)
ovos-skills-7f546bd6ff-h4kp9 ovos-skill-wikipedia                                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ovos-skills-7f546bd6ff-h4kp9 ovos-skill-wikipedia   File "/home/ovos/.venv/lib/python3.11/site-packages/nltk/tokenize/__init__.py", line 106, in sent_tokenize
ovos-skills-7f546bd6ff-h4kp9 ovos-skill-wikipedia     tokenizer = load(f"tokenizers/punkt/{language}.pickle")
ovos-skills-7f546bd6ff-h4kp9 ovos-skill-wikipedia                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ovos-skills-7f546bd6ff-h4kp9 ovos-skill-wikipedia   File "/home/ovos/.venv/lib/python3.11/site-packages/nltk/data.py", line 750, in load
ovos-skills-7f546bd6ff-h4kp9 ovos-skill-wikipedia     opened_resource = _open(resource_url)
ovos-skills-7f546bd6ff-h4kp9 ovos-skill-wikipedia                       ^^^^^^^^^^^^^^^^^^^
ovos-skills-7f546bd6ff-h4kp9 ovos-skill-wikipedia   File "/home/ovos/.venv/lib/python3.11/site-packages/nltk/data.py", line 876, in _open
ovos-skills-7f546bd6ff-h4kp9 ovos-skill-wikipedia     return find(path_, path + [""]).open()
ovos-skills-7f546bd6ff-h4kp9 ovos-skill-wikipedia            ^^^^^^^^^^^^^^^^^^^^^^^^
ovos-skills-7f546bd6ff-h4kp9 ovos-skill-wikipedia   File "/home/ovos/.venv/lib/python3.11/site-packages/nltk/data.py", line 583, in find
ovos-skills-7f546bd6ff-h4kp9 ovos-skill-wikipedia     raise LookupError(resource_not_found)
ovos-skills-7f546bd6ff-h4kp9 ovos-skill-wikipedia LookupError: 
ovos-skills-7f546bd6ff-h4kp9 ovos-skill-wikipedia **********************************************************************
ovos-skills-7f546bd6ff-h4kp9 ovos-skill-wikipedia   Resource punkt not found.
ovos-skills-7f546bd6ff-h4kp9 ovos-skill-wikipedia   Please use the NLTK Downloader to obtain the resource:
ovos-skills-7f546bd6ff-h4kp9 ovos-skill-wikipedia 
ovos-skills-7f546bd6ff-h4kp9 ovos-skill-wikipedia   >>> import nltk
ovos-skills-7f546bd6ff-h4kp9 ovos-skill-wikipedia   >>> nltk.download('punkt')
ovos-skills-7f546bd6ff-h4kp9 ovos-skill-wikipedia   
ovos-skills-7f546bd6ff-h4kp9 ovos-skill-wikipedia   For more information see: https://www.nltk.org/data.html
ovos-skills-7f546bd6ff-h4kp9 ovos-skill-wikipedia 
ovos-skills-7f546bd6ff-h4kp9 ovos-skill-wikipedia   Attempted to load tokenizers/punkt/PY3/english.pickle
ovos-skills-7f546bd6ff-h4kp9 ovos-skill-wikipedia 
ovos-skills-7f546bd6ff-h4kp9 ovos-skill-wikipedia   Searched in:
ovos-skills-7f546bd6ff-h4kp9 ovos-skill-wikipedia     - '/home/ovos/nltk_data'
ovos-skills-7f546bd6ff-h4kp9 ovos-skill-wikipedia     - '/home/ovos/.venv/nltk_data'
ovos-skills-7f546bd6ff-h4kp9 ovos-skill-wikipedia     - '/home/ovos/.venv/share/nltk_data'
ovos-skills-7f546bd6ff-h4kp9 ovos-skill-wikipedia     - '/home/ovos/.venv/lib/nltk_data'
ovos-skills-7f546bd6ff-h4kp9 ovos-skill-wikipedia     - '/usr/share/nltk_data'
ovos-skills-7f546bd6ff-h4kp9 ovos-skill-wikipedia     - '/usr/local/share/nltk_data'
ovos-skills-7f546bd6ff-h4kp9 ovos-skill-wikipedia     - '/usr/lib/nltk_data'
ovos-skills-7f546bd6ff-h4kp9 ovos-skill-wikipedia     - '/usr/local/lib/nltk_data'
ovos-skills-7f546bd6ff-h4kp9 ovos-skill-wikipedia     - ''
ovos-skills-7f546bd6ff-h4kp9 ovos-skill-wikipedia **********************************************************************
ovos-skills-7f546bd6ff-h4kp9 ovos-skill-wikipedia 

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.