-
Notifications
You must be signed in to change notification settings - Fork 116
Fix/tokenize simple output #2019
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
+579
−305
Merged
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
3624e8b
refactor: tokenization executor and models to support stopword config…
amourao 5a12f13
fix: update Weaviate 1.37.1 version to include specific build identifier
amourao 7b0042a
Merge branch 'dev/1.37' of https://github.com/weaviate/weaviate-pytho…
tsmith023 60887f3
fix: update Weaviate 1.37.1 version to include architecture suffix
amourao 9fd83b8
fix: refactor tokenization tests to use parameterized cases for impro…
amourao e9d6812
fix: update Weaviate 1.37.1 version and enhance tokenization tests wi…
amourao 202948a
Merge branch 'dev/1.37' into fix/tokenize_simple_output
amourao 959f554
refactor: ruff format
amourao 0f7fe47
test: refactor output types and tests to config
amourao 52c2c8c
refactor: remove unused imports in tokenization models and format
amourao 3de0955
Use public classes for .text endpoint
dirkkul 55b136a
Add overloads for exclusivity of stopwrods
dirkkul 7924e45
Accept collection config classes as stopwords
dirkkul 64bed62
Improve docstring
dirkkul 220e839
Hook up tokenization and clean up model
dirkkul 081aaef
Move property back to tokenization
dirkkul File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| from weaviate.collections.classes.config import ( | ||
| StopwordsConfig, | ||
| StopwordsCreate, | ||
| StopwordsPreset, | ||
| TextAnalyzerConfigCreate, | ||
| Tokenization, | ||
| ) | ||
| from weaviate.tokenization.models import TokenizeResult | ||
|
|
||
| __all__ = [ | ||
| "StopwordsConfig", | ||
| "StopwordsCreate", | ||
| "StopwordsPreset", | ||
| "TextAnalyzerConfigCreate", | ||
| "Tokenization", | ||
| "TokenizeResult", | ||
| ] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,21 +1,35 @@ | ||
| from typing import Dict, Optional | ||
| from typing import Dict, List, Optional, Union, overload | ||
|
|
||
| from weaviate.collections.classes.config import ( | ||
| StopwordsConfig, | ||
| StopwordsCreate, | ||
| TextAnalyzerConfigCreate, | ||
| Tokenization, | ||
| _StopwordsCreate, | ||
| _TextAnalyzerConfigCreate, | ||
| ) | ||
| from weaviate.connect.v4 import ConnectionAsync | ||
| from weaviate.tokenization.models import TokenizeResult | ||
|
|
||
| from .executor import _TokenizationExecutor | ||
|
|
||
| class _TokenizationAsync(_TokenizationExecutor[ConnectionAsync]): | ||
| @overload | ||
| async def text( | ||
| self, | ||
| text: str, | ||
| tokenization: Tokenization, | ||
| *, | ||
| analyzer_config: Optional[_TextAnalyzerConfigCreate] = None, | ||
| stopword_presets: Optional[Dict[str, _StopwordsCreate]] = None, | ||
| analyzer_config: Optional[TextAnalyzerConfigCreate] = ..., | ||
| stopwords: Optional[Union[StopwordsCreate, StopwordsConfig]] = ..., | ||
| ) -> TokenizeResult: ... | ||
| @overload | ||
| async def text( | ||
| self, | ||
| text: str, | ||
| tokenization: Tokenization, | ||
| *, | ||
| analyzer_config: Optional[TextAnalyzerConfigCreate] = ..., | ||
| stopword_presets: Optional[Dict[str, List[str]]] = ..., | ||
| ) -> TokenizeResult: ... | ||
| async def for_property( | ||
| self, collection: str, property_name: str, text: str | ||
| ) -> TokenizeResult: ... |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.