- API
- Changelog
- (unreleased)
- 3.0.2 (2023-02-15)
- 3.0.1 (2023-12-20)
- 3.0.0 (2023-12-20)
- 2.5.0 (2023-11-28)
- 2.4.2 (2023-11-22)
- 2.4.3 (2023-11-22)
- 2.4.2 (2023-11-21)
- 2.4.1 (2023-11-15)
- 2.4.0 (2023-11-15)
- 2.3.1 (2023-11-01)
- 2.3.0 (2023-10-25)
- 2.2.0 (2023-09-28)
- 2.1.0 (2023-08-07)
- 2.0.3 (2023-04-06)
- 2.0.2 (2023-03-28)
- 2.0.1 (2022-12-09)
- 2.0.0 (2022-12-05)
- 1.0.8 (2021-11-29)
- 1.0.7 (2021-11-03)
- 1.0.6 (2021-10-06)
- 1.0.5 (2021-10-05)
- 1.0.4 (2021-10-05)
- 1.0.3 (2021-07-07)
- 1.0.2
- 1.0.1
- 1.0.0
- Contributing
- License
deduce.str¶
deduce.str.processor¶
- class deduce.str.processor.UpperCase¶
Bases:
StringModifier
Uppercase string.
- process(item: str) str ¶
Processes a string by modifying it.
- Parameters:
item – The input string.
- Returns:
The output string.
- class deduce.str.processor.UpperCaseFirstChar¶
Bases:
StringModifier
Uppercase first character.
- process(item: str) str ¶
Processes a string by modifying it.
- Parameters:
item – The input string.
- Returns:
The output string.
- class deduce.str.processor.TitleCase¶
Bases:
StringModifier
Titlecase string.
- process(item: str) str ¶
Processes a string by modifying it.
- Parameters:
item – The input string.
- Returns:
The output string.
- class deduce.str.processor.TakeLastToken¶
Bases:
StringModifier
Take the last token, split by string.
- process(item: str) str ¶
Processes a string by modifying it.
- Parameters:
item – The input string.
- Returns:
The output string.
- class deduce.str.processor.RemoveValues(filter_values: list[str])¶
Bases:
StringModifier
Remove values as words (between whitespaces, or at start/end of text).
- Parameters:
filter_values – The values to remove.
- process(item: str) str ¶
Processes a string by modifying it.
- Parameters:
item – The input string.
- Returns:
The output string.
- class deduce.str.processor.Acronimify(split_value: str = ' ', join_value: str = '')¶
Bases:
StringModifier
Acronimify, by splitting on string and taking the first character of each ‘word’.
- Parameters:
split_value – The value to split on, default whitespace.
join_value – The value to join on, default empty string.
- process(item: str) str ¶
Processes a string by modifying it.
- Parameters:
item – The input string.
- Returns:
The output string.
- class deduce.str.processor.FilterBasedOnLookupSet(filter_set: LookupSet, case_sensitive: bool = True)¶
Bases:
StringFilter
Filter, based on LookupSet.
- Parameters:
filter_set – The lookup set, containing the elements to filter
case_sensitive – Whether to filter case sensitive
- filter(item: str) bool ¶
Filters strings.
- Parameters:
item – The input string.
- Returns:
True
to keep the item,False
to remove it (same asfilter
builtin).