Skip to content
This repository has been archived by the owner on May 12, 2024. It is now read-only.

Commit

Permalink
fixing casing
Browse files Browse the repository at this point in the history
  • Loading branch information
Jemoka committed Dec 8, 2023
1 parent 282ec67 commit dcc0695
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 8 deletions.
4 changes: 2 additions & 2 deletions baln/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

from multiprocessing import Process, freeze_support

VERSION="0.3.58"
NOTES="enabling old utterance model"
VERSION="0.3.59"
NOTES="fixing various UD casings"

#################### OPTIONS ################################

Expand Down
17 changes: 12 additions & 5 deletions baln/ud.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,19 +127,26 @@ def handler__PRON(word):
person = '4'

# parse
return (handler(word)+"-"+
feats.get("PronType", "Int")+"-"+
feats.get("Case", "Acc").replace(",", "")+"-"+
feats.get("Number", "S")[0]+person)
return (handler(word)+
stringify_feats(feats.get("PronType", "Int"),
feats.get("Case","").replace(",", ""),
feats.get("Number", "")[:1]+person))

def handler__DET(word):
# get the features
try:
feats = parse_feats(word)
except AttributeError:
return handler(word)

# get gender and numer
gender_str = "&"+feats.get("Gender", "").replace(",", "")

# clear defaults
if gender_str == "&Com,Neut" or gender_str == "&Com" or gender_str=="&": gender_str=""

# parse
return (handler(word)+"-"+
return (handler(word)+gender_str+"-"+
feats.get("Definite", "Def") + stringify_feats(feats.get("PronType", "")))

def handler__ADJ(word):
Expand Down
2 changes: 1 addition & 1 deletion meta.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{% set name = "batchalign" %}
{% set version = "0.3.58" %}
{% set version = "0.3.59" %}

package:
name: {{ name }}
Expand Down

0 comments on commit dcc0695

Please sign in to comment.