Giter VIP home page Giter VIP logo

dependency-paraphraser's Introduction

Hi! I am David Dale, research engineer in natural language processing. 👋

You can read more about me in Russian or English.

I am open to collaboration, especially on creating NLP tools (such as machine translation models) for lower-resourced languages.

Some of my best repos are:

  • dialogic - for developing multiplatform chatbots and voice skills in Python
  • compress-fasttext - for bringing lightweight, fast and accurate word embeddings to your project
  • python-ruwordnet - for those who want to understand language beyound embeddings and need a Russian thesaurus
  • dependency-paraphraser - a simple tool for paraphrasing that respect sentence structure
  • word-mover-grammar - a constituency grammar parser that supports word embeddings
  • weirdMath - a collection of small Python etudes, mostly about data science

You can also take a look at my HugginFace contributions, including:

My Telegram channels:

Contacts:

dependency-paraphraser's People

Contributors

avidale avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

dependency-paraphraser's Issues

AttributeError: 'Token' object has no attribute 'text'

Hi there!
Trying to use dependency-paraphraser for English. As the word2vec model I use 'word2vec-google-news-300' and load it like this:

import dependency_paraphraser.udpipe
import gensim.downloader

w2v_model = gensim.downloader.load('word2vec-google-news-300')

path = 'english-ewt-ud-2.5-191206.udpipe
pipe = dependency_paraphraser.udpipe.Model(path)
projector = dependency_paraphraser.udpipe.en_udpipe_projector

text = 'in April 2012 they released the videoclip for a new single entitled Giorgio Mastrota.'
for i in range(3):
print(dependency_paraphraser.udpipe.paraphrase(text, pipe, w2v=w2v_model, projector=projector, tree_temperature=1))

I get the following error:

Traceback (most recent call last):
File "dependency_rewriter.py", line 34, in
print(dependency_paraphraser.udpipe.paraphrase(text, pipe, w2v=w2v_model, projector=projector, tree_temperature=1))
File "/home/.local/lib/python3.7/site-packages/dependency_paraphraser/udpipe.py", line 90, in paraphrase
toks, w2v=w2v, morph_vocab=morph, min_sim=min_sim, p_rep=p_rep,
File "/home/.local/lib/python3.7/site-packages/dependency_paraphraser/synonyms.py", line 48, in replace_synonyms
result.append(token.text)
AttributeError: 'Token' object has no attribute 'text'

How could I fix it? Thanks in advance for answer!

Нет аттрибута PolynomialFeatures

Привет!
Запускаю первый пример из ридми.
Сталкиваюсь с такой ошибкой:

/usr/local/lib/python3.9/dist-packages/sklearn/base.py:318: UserWarning: Trying to unpickle estimator DictVectorizer from version 0.22.2.post1 when using version 1.2.2. This might lead to breaking code or invalid results. Use at your own risk. For more info please refer to:
https://scikit-learn.org/stable/model_persistence.html#security-maintainability-limitations
  warnings.warn(
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
[<ipython-input-2-d8a1d21065ce>](https://localhost:8080/#) in <cell line: 3>()
      1 text = 'каждый охотник желает знать где сидит фазан'
      2 
----> 3 import dependency_paraphraser.natasha
      4 import random
      5 random.seed(42)

1 frames
[/usr/local/lib/python3.9/dist-packages/dependency_paraphraser/pretrained_projectors.py](https://localhost:8080/#) in <module>
      6 
      7 with open(os.path.join(models_path, 'natasha_projector.pkl'), 'rb') as f:
----> 8     natasha_projector = pickle.load(f)
      9 
     10 with open(os.path.join(models_path, 'en_udpipe_projector.pkl'), 'rb') as f:

AttributeError: Can't get attribute 'PolynomialFeatures' on <module 'sklearn.preprocessing._data' from '/usr/local/lib/python3.9/dist-packages/sklearn/preprocessing/_data.py'>

Пока не пробовал делать ничего с версиями.
По всей видимости что-то изменилось в аттрибутах sklearn?

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.