Skip to content

armgit / laya

Public Imported from GitHub
0

Non-autoregressive System 1 decision engine. Typed choice, score and yes/no decisions over any text in a single forward pass, in 100+ languages, with a router that picks the right checkpoint per request.

docs(lang): say that mixed_segment is filled only by the segment scan

Aashisha6e49f7b7e12
diff --git a/laya/lang.py b/laya/lang.py
index f8ecb336..58ea55ea 100644
--- a/laya/lang.py
+++ b/laya/lang.py
@@ -809,8 +809,10 @@ def analyse(state: Union[str, bytes, Mapping, list, None]) -> Dict[str, object]:
"""Full detection result for a state.
Returns `script`, `script_profile`, `language` (best effort, may be None),
- `is_english`, `non_latin_fraction` and `mixed_segment` (the line or field that made a mostly
- English state non-English, else None).
+ `is_english`, `non_latin_fraction` and `mixed_segment`. `mixed_segment` names the line or field
+ the segment scan itself singled out, else None: a state flipped non-English by the per-value
+ read below is reported with `mixed_segment` still None, because that read keeps the offending
+ value in its own local and never writes it back.
String values are what get read. When a state has several of them, one non-English value is
enough: joining every value into one window let a long English note fill the 4000 characters,