We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1243565 commit 25ef609Copy full SHA for 25ef609
fastlangid/__init__.py
@@ -1 +1,8 @@
1
-from .langid import LID
+from .langid import LID
2
+
3
+_CACHE = {}
4
5
+def detect(text, **params):
6
+ if 'model' not in _CACHE:
7
+ _CACHE['model'] = LID()
8
+ return _CACHE['model'].predict(text, **params)
setup.py
@@ -12,7 +12,7 @@
12
Authors:
13
Ray : ray@currentsapi.services
14
'''
15
-from setuptools import setup, Extension
+from setuptools import setup
16
17
try:
18
from setuptools import setup
@@ -27,7 +27,7 @@
27
28
setup(
29
name='fastlangid',
30
- version='1.0.9',
+ version='1.0.10',
31
description='Language detection for news powered by fasttext',
32
long_description=readme,
33
long_description_content_type="text/markdown",
0 commit comments