FraBle / python-sutime

Python wrapper for Stanford CoreNLP's SUTime
GNU General Public License v3.0
153 stars 43 forks source link

Change the used languagemodel #54

Open mpXtiM opened 3 years ago

mpXtiM commented 3 years ago

I created a german ruleset and try to use it. The problem is if I change the sutime.py language to german it still loads the English rules. Has anybody a solution for that? My workaround for now was to add the changed rules to the spanish model as 'spanish.sutime'.

Josua996 commented 1 year ago

Hey @mpXtiM, are you willing to share your rule file?

You can pass the language as argument when you initialize SuTime:

sutime_de = SUTime(jars="sutime/target/", mark_time_ranges=True, include_range=True, language="german")