Buckets:
AnonymousSpottedToad/candidate_bucket / codebase /python /lexy-ai_lexy /lexy /transformers /counter.py
| from lexy.models.document import DocumentBase | |
| from lexy.transformers import lexy_transformer | |
| def word_counter(text: str) -> tuple[int, str]: | |
| """Testing a transformer.""" | |
| if isinstance(text, DocumentBase): | |
| text = text.content | |
| words = text.split() | |
| word_count = len(words) | |
| longest_word = max(words, key=len) | |
| return word_count, longest_word | |
Xet Storage Details
- Size:
- 423 Bytes
- Xet hash:
- 2d054259ca2a5605886811aac47c1a04189e31ad54b4448f8585f8aeb07ad7f8
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.