Skip to content

Commit

Permalink
ERRANT v2.3.3
Browse files Browse the repository at this point in the history
  • Loading branch information
Christopher Bryant committed Apr 14, 2022
1 parent ea07b4a commit 1864370
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 5 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Expand Up @@ -2,6 +2,10 @@

This log describes all the changes made to ERRANT since its release.

## v2.3.3 (14-04-22)

1. Missed one case of changing Levenshtein to rapidfuzz... Now fixed.

## v2.3.2 (14-04-22)

1. Add more details to verbose ERRANT scoring. [#29](https://github.com/chrisjbryant/errant/pull/29)
Expand Down
2 changes: 1 addition & 1 deletion README.md
@@ -1,4 +1,4 @@
# ERRANT v2.3.2
# ERRANT v2.3.3

This repository contains the grammatical ERRor ANnotation Toolkit (ERRANT) described in:

Expand Down
2 changes: 1 addition & 1 deletion errant/__init__.py
Expand Up @@ -3,7 +3,7 @@
from errant.annotator import Annotator

# ERRANT version
__version__ = '2.3.2'
__version__ = '2.3.3'

# Load an ERRANT Annotator object for a given language
def load(lang, nlp=None):
Expand Down
4 changes: 2 additions & 2 deletions errant/en/merger.py
@@ -1,7 +1,7 @@
from itertools import combinations, groupby
from re import sub
from string import punctuation
import Levenshtein
from rapidfuzz.distance import Indel
import spacy.symbols as POS
from errant.edit import Edit

Expand Down Expand Up @@ -117,7 +117,7 @@ def is_punct(token):

# Calculate the cost of character alignment; i.e. char similarity
def char_cost(a, b):
return Levenshtein.ratio(a.text, b.text)
return 1-Indel.normalized_distance(a.text, b.text)

# Merge the input alignment sequence to a single edit span
def merge_edits(seq):
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Expand Up @@ -10,7 +10,7 @@

setup(
name = "errant",
version = "2.3.2",
version = "2.3.3",
license = "MIT",
description = "The ERRor ANnotation Toolkit (ERRANT). Automatically extract and classify edits in parallel sentences.",
long_description = readme,
Expand Down

0 comments on commit 1864370

Please sign in to comment.