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 b775f8c commit aeac7b6Copy full SHA for aeac7b6
src/fast_langdetect/infer.py
@@ -1,17 +1,6 @@
1
# -*- coding: utf-8 -*-
2
"""
3
FastText based language detection module.
4
-
5
-Fallback policy (keep it simple):
6
-- Only MemoryError triggers fallback: when loading the large model with
7
- low_memory=False raises MemoryError, smart 会回退到小模型。
8
-- No fallback for I/O/network/integrity errors: download failures, offline,
9
- invalid path, permission issues, verification failures all raise DetectError.
10
11
-Cache directory behavior:
12
-- Default cache (FTLANG_CACHE or internal temp-based path) is auto-created.
13
-- If a user-specified cache_dir does not exist, raise DetectError rather than
14
- silently creating or using another location.
15
16
17
import logging
0 commit comments