Skip to content
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

add pymorphy3 add python 3.11 to tests #28

Merged
merged 1 commit into from
Sep 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# This workflow will install Python dependencies, run tests and lint with a single version of Python

Check warning on line 1 in .github/workflows/run-tests.yml

View workflow job for this annotation

GitHub Actions / build

1:81 [line-length] line too long (100 > 80 characters)
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python

Check warning on line 2 in .github/workflows/run-tests.yml

View workflow job for this annotation

GitHub Actions / build

2:81 [line-length] line too long (118 > 80 characters)

name: Run Tests

on: ["push", "pull_request"]
on: [push, pull_request]

permissions:
contents: read
Expand All @@ -12,13 +12,15 @@
build:

runs-on: ubuntu-latest

strategy:
matrix:
python-version: ["3.10", "3.11"]
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: "3.10"
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
Expand Down
6 changes: 3 additions & 3 deletions find_similar/tokenize.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
import nltk
from nltk.tokenize import word_tokenize
from nltk.corpus import stopwords
import pymorphy2
import pymorphy3 as pymorphy

from find_similar.calc_models import LanguageNotFoundException

morph = pymorphy2.MorphAnalyzer()
morph = pymorphy.MorphAnalyzer()

PUNCTUATION_SET = {";", ",", ".", "(", ")", "*", "-", ":"}
UNUSEFUL_WORDS = {
Expand Down Expand Up @@ -181,7 +181,7 @@ def remove_part_speech(part_parse, parts=None, dictionary=None):
return result


def get_parsed_text(word: str) -> pymorphy2:
def get_parsed_text(word: str):
"""
Get Parsed Text
:param word: str word
Expand Down
Binary file modified requirements.txt
Binary file not shown.
Loading