-
Notifications
You must be signed in to change notification settings - Fork 30
Open
Description
I'm attempting to match a language code 'pa' with another language code 'pa-PK'.
def test_language_less_than():
spoken_language_1 = 'pa'
spoken_language_2 = 'pa-PK'
match = closest_match(spoken_language_1, [spoken_language_2])
print(match)
self.assertEqual(0, match[1])`
def test_language_more_than(self):
spoken_language_1 = 'pa-PK'
spoken_language_2 = 'pa'
match = closest_match(spoken_language_1, [spoken_language_2])
print(match)
self.assertEqual(0, match[1])`
This returns
('und', 1000)
('und', 1000)
I would expect this to return a match and not None. When I debug the library, I see the following which returns 54 from the tuple_distance_cached function.
desired_triple = ('pa', 'Arab', 'PK')
supported_triple = ('pa', 'Guru', 'IN')
Metadata
Metadata
Assignees
Labels
No labels