Skip to content

Commit

Permalink
add pymorphy3 add python 3.11 to tests
Browse files Browse the repository at this point in the history
  • Loading branch information
quillcraftsman committed Sep 9, 2023
1 parent b602003 commit 220c608
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

name: Run Tests

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

permissions:
contents: read
Expand All @@ -12,13 +12,15 @@ jobs:
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.

0 comments on commit 220c608

Please sign in to comment.