langdetect-haystack 1.0.0__tar.gz → 2.0.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (16) hide show
  1. langdetect_haystack-2.0.0/CHANGELOG.md +9 -0
  2. {langdetect_haystack-1.0.0 → langdetect_haystack-2.0.0}/PKG-INFO +5 -4
  3. {langdetect_haystack-1.0.0 → langdetect_haystack-2.0.0}/README.md +1 -0
  4. {langdetect_haystack-1.0.0 → langdetect_haystack-2.0.0}/pyproject.toml +3 -2
  5. {langdetect_haystack-1.0.0 → langdetect_haystack-2.0.0}/src/haystack_integrations/components/routers/langdetect/text_language_router.py +5 -5
  6. {langdetect_haystack-1.0.0 → langdetect_haystack-2.0.0}/.gitignore +0 -0
  7. {langdetect_haystack-1.0.0 → langdetect_haystack-2.0.0}/LICENSE.txt +0 -0
  8. {langdetect_haystack-1.0.0 → langdetect_haystack-2.0.0}/pydoc/config_docusaurus.yml +0 -0
  9. {langdetect_haystack-1.0.0 → langdetect_haystack-2.0.0}/src/haystack_integrations/components/classifiers/langdetect/__init__.py +0 -0
  10. {langdetect_haystack-1.0.0 → langdetect_haystack-2.0.0}/src/haystack_integrations/components/classifiers/langdetect/document_language_classifier.py +0 -0
  11. {langdetect_haystack-1.0.0 → langdetect_haystack-2.0.0}/src/haystack_integrations/components/classifiers/py.typed +0 -0
  12. {langdetect_haystack-1.0.0 → langdetect_haystack-2.0.0}/src/haystack_integrations/components/routers/langdetect/__init__.py +0 -0
  13. {langdetect_haystack-1.0.0 → langdetect_haystack-2.0.0}/src/haystack_integrations/components/routers/py.typed +0 -0
  14. {langdetect_haystack-1.0.0 → langdetect_haystack-2.0.0}/tests/__init__.py +0 -0
  15. {langdetect_haystack-1.0.0 → langdetect_haystack-2.0.0}/tests/test_document_language_classifier.py +0 -0
  16. {langdetect_haystack-1.0.0 → langdetect_haystack-2.0.0}/tests/test_text_language_router.py +0 -0
@@ -0,0 +1,9 @@
1
+ # Changelog
2
+
3
+ ## [integrations/langdetect-v1.0.0] - 2026-06-18
4
+
5
+ ### 🚀 Features
6
+
7
+ - Add langdetect integration (moved from Haystack core) (#3457)
8
+
9
+ <!-- generated by git-cliff -->
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.4
1
+ Metadata-Version: 2.5
2
2
  Name: langdetect-haystack
3
- Version: 1.0.0
3
+ Version: 2.0.0
4
4
  Summary: Haystack integration for langdetect
5
5
  Project-URL: Documentation, https://github.com/deepset-ai/haystack-core-integrations/tree/main/integrations/langdetect#readme
6
6
  Project-URL: Issues, https://github.com/deepset-ai/haystack-core-integrations/issues
@@ -12,14 +12,14 @@ Keywords: Haystack,langdetect,language classification,language detection,languag
12
12
  Classifier: Development Status :: 4 - Beta
13
13
  Classifier: License :: OSI Approved :: Apache Software License
14
14
  Classifier: Programming Language :: Python
15
- Classifier: Programming Language :: Python :: 3.10
16
15
  Classifier: Programming Language :: Python :: 3.11
17
16
  Classifier: Programming Language :: Python :: 3.12
18
17
  Classifier: Programming Language :: Python :: 3.13
19
18
  Classifier: Programming Language :: Python :: 3.14
19
+ Classifier: Programming Language :: Python :: 3.15
20
20
  Classifier: Programming Language :: Python :: Implementation :: CPython
21
21
  Classifier: Programming Language :: Python :: Implementation :: PyPy
22
- Requires-Python: >=3.10
22
+ Requires-Python: >=3.11
23
23
  Requires-Dist: haystack-ai>=2.24.1
24
24
  Requires-Dist: langdetect>=1.0.9
25
25
  Description-Content-Type: text/markdown
@@ -29,6 +29,7 @@ Description-Content-Type: text/markdown
29
29
  [![PyPI - Version](https://img.shields.io/pypi/v/langdetect-haystack.svg)](https://pypi.org/project/langdetect-haystack)
30
30
  [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/langdetect-haystack.svg)](https://pypi.org/project/langdetect-haystack)
31
31
 
32
+ - [Integration page](https://haystack.deepset.ai/integrations/langdetect)
32
33
  - [Changelog](https://github.com/deepset-ai/haystack-core-integrations/blob/main/integrations/langdetect/CHANGELOG.md)
33
34
 
34
35
  ---
@@ -3,6 +3,7 @@
3
3
  [![PyPI - Version](https://img.shields.io/pypi/v/langdetect-haystack.svg)](https://pypi.org/project/langdetect-haystack)
4
4
  [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/langdetect-haystack.svg)](https://pypi.org/project/langdetect-haystack)
5
5
 
6
+ - [Integration page](https://haystack.deepset.ai/integrations/langdetect)
6
7
  - [Changelog](https://github.com/deepset-ai/haystack-core-integrations/blob/main/integrations/langdetect/CHANGELOG.md)
7
8
 
8
9
  ---
@@ -7,7 +7,7 @@ name = "langdetect-haystack"
7
7
  dynamic = ["version"]
8
8
  description = "Haystack integration for langdetect"
9
9
  readme = "README.md"
10
- requires-python = ">=3.10"
10
+ requires-python = ">=3.11"
11
11
  license = "Apache-2.0"
12
12
  keywords = ["Haystack", "langdetect", "language detection", "language classification", "language routing"]
13
13
  authors = [{ name = "deepset GmbH", email = "info@deepset.ai" }]
@@ -15,11 +15,11 @@ classifiers = [
15
15
  "License :: OSI Approved :: Apache Software License",
16
16
  "Development Status :: 4 - Beta",
17
17
  "Programming Language :: Python",
18
- "Programming Language :: Python :: 3.10",
19
18
  "Programming Language :: Python :: 3.11",
20
19
  "Programming Language :: Python :: 3.12",
21
20
  "Programming Language :: Python :: 3.13",
22
21
  "Programming Language :: Python :: 3.14",
22
+ "Programming Language :: Python :: 3.15",
23
23
  "Programming Language :: Python :: Implementation :: CPython",
24
24
  "Programming Language :: Python :: Implementation :: PyPy",
25
25
  ]
@@ -132,6 +132,7 @@ ignore = [
132
132
  "PLR0912",
133
133
  "PLR0913",
134
134
  "PLR0915",
135
+ "PLR0917",
135
136
  # Allow `Any` type - used legitimately for dynamic types and SDK boundaries
136
137
  "ANN401",
137
138
  ]
@@ -14,10 +14,10 @@ class TextLanguageRouter:
14
14
  """
15
15
  Routes text strings to different output connections based on their language.
16
16
 
17
- Provide a list of languages during initialization. If the document's text doesn't match any of the
18
- specified languages, the metadata value is set to "unmatched".
17
+ Provide a list of languages during initialization. If the text doesn't match any of the
18
+ specified languages, it is routed to the unmatched output.
19
19
  For routing documents based on their language, use the DocumentLanguageClassifier component,
20
- followed by the MetaDataRouter.
20
+ followed by the MetadataRouter.
21
21
 
22
22
  ### Usage example
23
23
 
@@ -60,7 +60,7 @@ class TextLanguageRouter:
60
60
  """
61
61
  Routes the text strings to different output connections based on their language.
62
62
 
63
- If the document's text doesn't match any of the specified languages, the metadata value is set to "unmatched".
63
+ If the text doesn't match any of the specified languages, it is routed to the unmatched output.
64
64
 
65
65
  :param text: A text string to route.
66
66
 
@@ -72,7 +72,7 @@ class TextLanguageRouter:
72
72
  if not isinstance(text, str):
73
73
  msg = (
74
74
  "TextLanguageRouter expects a string as input. In case you want to classify a document, please use "
75
- "the DocumentLanguageClassifier and MetaDataRouter."
75
+ "the DocumentLanguageClassifier and MetadataRouter."
76
76
  )
77
77
  raise TypeError(msg)
78
78