mirror of
https://github.com/explosion/spaCy.git
synced 2024-11-10 19:57:17 +03:00
* Add tests for canon_case
This commit is contained in:
parent
4c7b997df7
commit
786a4a86fe
20
tests/test_canon_case.py
Normal file
20
tests/test_canon_case.py
Normal file
|
@ -0,0 +1,20 @@
|
|||
from __future__ import unicode_literals
|
||||
|
||||
import py.test
|
||||
|
||||
from spacy.orth import canon_case as cc
|
||||
|
||||
def test_nasa():
|
||||
assert cc('Nasa', 0.0, 0, {'upper': 0.6, 'title': 0.3, 'lower': 0.1}, {}) == 'NASA'
|
||||
|
||||
|
||||
def test_john():
|
||||
assert cc('john', 0.0, 0, {'title': 0.6, 'upper': 0.3, 'lower': 0.1}, {}) == 'John'
|
||||
|
||||
|
||||
def test_apple():
|
||||
assert cc('apple', 0.0, 0, {'lower': 0.6, 'title': 0.3, 'upper': 0.1}, {}) == 'apple'
|
||||
|
||||
|
||||
def test_tie():
|
||||
assert cc('I', 0.0, 0, {'lower': 0.0, 'title': 0.0, 'upper': 0.0}, {}) == 'I'
|
Loading…
Reference in New Issue
Block a user