mirror of
https://github.com/IRBorisov/ConceptPortal.git
synced 2025-06-26 04:50:36 +03:00
Update pymorphy to use newer version
also update dependencies. Prepare to move to python 3.12
This commit is contained in:
parent
c1fc52821b
commit
b51abc8279
|
@ -85,7 +85,8 @@ This readme file is used mostly to document project dependencies
|
||||||
- gunicorn
|
- gunicorn
|
||||||
- coreapi
|
- coreapi
|
||||||
- psycopg2-binary
|
- psycopg2-binary
|
||||||
- pymorphy2
|
- pymorphy3
|
||||||
|
- pymorphy3-dicts-ru
|
||||||
- razdel
|
- razdel
|
||||||
</pre>
|
</pre>
|
||||||
</details>
|
</details>
|
||||||
|
|
|
@ -4,8 +4,8 @@ from rest_framework import routers
|
||||||
from . import views
|
from . import views
|
||||||
|
|
||||||
library_router = routers.SimpleRouter(trailing_slash=False)
|
library_router = routers.SimpleRouter(trailing_slash=False)
|
||||||
library_router.register('library', views.LibraryViewSet)
|
library_router.register('library', views.LibraryViewSet, 'Library')
|
||||||
library_router.register('rsforms', views.RSFormViewSet)
|
library_router.register('rsforms', views.RSFormViewSet, 'RSForm')
|
||||||
|
|
||||||
urlpatterns = [
|
urlpatterns = [
|
||||||
path('library/active', views.LibraryActiveView.as_view(), name='library'),
|
path('library/active', views.LibraryActiveView.as_view(), name='library'),
|
||||||
|
|
|
@ -3,8 +3,8 @@ from __future__ import annotations
|
||||||
from enum import Enum, unique
|
from enum import Enum, unique
|
||||||
from typing import Iterable, Optional
|
from typing import Iterable, Optional
|
||||||
|
|
||||||
from pymorphy2 import MorphAnalyzer
|
from pymorphy3 import MorphAnalyzer
|
||||||
from pymorphy2.tagset import OpencorporaTag as WordTag
|
from pymorphy3.tagset import OpencorporaTag as WordTag
|
||||||
|
|
||||||
# ''' Morphology parser. '''
|
# ''' Morphology parser. '''
|
||||||
morpho = MorphAnalyzer()
|
morpho = MorphAnalyzer()
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
''' Parsing russian language using pymorphy2 and natasha libraries. '''
|
''' Parsing russian language using pymorphy3 and natasha libraries. '''
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
from typing import Optional
|
from typing import Optional
|
||||||
|
|
||||||
from razdel.substring import Substring as Segment
|
from razdel.substring import Substring as Segment
|
||||||
from pymorphy2.analyzer import Parse as WordParse
|
from pymorphy3.analyzer import Parse as WordParse
|
||||||
|
|
||||||
from .syntax import RuSyntax, Capitalization
|
from .syntax import RuSyntax, Capitalization
|
||||||
from .rumodel import SemanticRole, Morphology, WordTag, morpho, Grammemes
|
from .rumodel import SemanticRole, Morphology, WordTag, morpho, Grammemes
|
||||||
|
|
|
@ -19,5 +19,5 @@ ignore_missing_imports = True
|
||||||
[mypy-razdel.*]
|
[mypy-razdel.*]
|
||||||
ignore_missing_imports = True
|
ignore_missing_imports = True
|
||||||
|
|
||||||
[mypy-pymorphy2.*]
|
[mypy-pymorphy3.*]
|
||||||
ignore_missing_imports = True
|
ignore_missing_imports = True
|
|
@ -1,13 +1,11 @@
|
||||||
tzdata==2024.1
|
tzdata==2024.1
|
||||||
Django==4.2.10
|
Django==4.2.11
|
||||||
djangorestframework==3.14.0
|
djangorestframework==3.15.1
|
||||||
django-cors-headers==4.3.1
|
django-cors-headers==4.3.1
|
||||||
django-filter==23.5
|
django-filter==24.1
|
||||||
drf-spectacular==0.27.1
|
drf-spectacular==0.27.1
|
||||||
coreapi==2.3.3
|
coreapi==2.3.3
|
||||||
pymorphy2==0.9.1
|
pymorphy3==2.0.1
|
||||||
pymorphy2-dicts-ru==2.4.417127.4579844
|
|
||||||
pymorphy2-dicts-uk==2.4.1.1.1460299261
|
|
||||||
razdel==0.5.0
|
razdel==0.5.0
|
||||||
django-rest-passwordreset==1.4.0
|
django-rest-passwordreset==1.4.0
|
||||||
|
|
||||||
|
|
|
@ -5,9 +5,7 @@ django-cors-headers
|
||||||
django-filter
|
django-filter
|
||||||
drf-spectacular
|
drf-spectacular
|
||||||
coreapi
|
coreapi
|
||||||
pymorphy2
|
pymorphy3
|
||||||
pymorphy2-dicts-ru
|
|
||||||
pymorphy2-dicts-uk
|
|
||||||
razdel
|
razdel
|
||||||
|
|
||||||
mypy
|
mypy
|
||||||
|
|
Loading…
Reference in New Issue
Block a user