Skip to content

Commit

Permalink
karachay-balkar parser
Browse files Browse the repository at this point in the history
  • Loading branch information
vmonakhov committed Jan 13, 2025
1 parent d0267ba commit f47f5bf
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 1 deletion.
29 changes: 29 additions & 0 deletions alembic/versions/f3a8a6cb9ef4_karachay_balkar_parser.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
"""karachay_balkar_parser
Revision ID: f3a8a6cb9ef4
Revises: 882f3864b825
Create Date: 2025-01-13 17:07:07.383095
"""

# revision identifiers, used by Alembic.
revision = 'f3a8a6cb9ef4'
down_revision = '882f3864b825'
branch_labels = None
depends_on = None

from alembic import op
import sqlalchemy as sa


def upgrade():
op.execute('''
INSERT INTO public.parser(additional_metadata, created_at, object_id, client_id, name, parameters, method)
VALUES(null, '2025-01-13 14:14:14.579664', 17, 1, 'Парсер карачаево-балкарского языка Apertium', '[]',
'apertium_krc');
''')

def downgrade():
op.execute('''
DELETE FROM parser WHERE method = 'apertium_krc';
''')
2 changes: 1 addition & 1 deletion aux_scripts/apertium_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ else

# Updating all parsers.

PARSER_LIST=("apertium-kaz" "apertium-tat" "apertium-rus" "apertium-kaz-rus" "apertium-tat-rus" "apertium-sah" "apertium-bak" "apertium-tat-bak" "apertium-tyv" "apertium-eng" "apertium-hye");
PARSER_LIST=("apertium-kaz" "apertium-tat" "apertium-rus" "apertium-kaz-rus" "apertium-tat-rus" "apertium-sah" "apertium-bak" "apertium-tat-bak" "apertium-tyv" "apertium-eng" "apertium-hye" "apertium-krc");

fi;

Expand Down
1 change: 1 addition & 0 deletions lingvodoc/schema/query.py
Original file line number Diff line number Diff line change
Expand Up @@ -7730,6 +7730,7 @@ class Arguments:
'apertium_eng': 'english',
'apertium_tuv': 'tuvan',
'apertium_hye': 'armenian',
'apertium-krc': 'karachay_balkar',
'hfst_kalmyk': 'kalmyk',
'hfst_ancient_kalmyk': 'ancient_kalmyk'}

Expand Down
3 changes: 3 additions & 0 deletions lingvodoc/utils/doc_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -474,6 +474,9 @@ def apertium_tuv(dedoc_output, apertium_path):
def apertium_hye(dedoc_output, apertium_path):
return apertium_parser(dedoc_output, apertium_path, 'hye')

def apertium_krc(dedoc_output, apertium_path):
return apertium_parser(dedoc_output, apertium_path, 'krc')

def hfst_kalmyk(dedoc_output):
return hfst_parser(dedoc_output, 'xal')

Expand Down

0 comments on commit f47f5bf

Please sign in to comment.