Skip to content
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

Fixes in transforms.py #94

Merged
merged 1 commit into from
Nov 1, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions jiwer/transforms.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
import string
import unicodedata

from typing import Union, List, Mapping
from typing import Iterable, Union, List, Mapping


__all__ = [
Expand Down Expand Up @@ -133,7 +133,7 @@ def __call__(self, text):


class BaseRemoveTransform(AbstractTransform):
def __init__(self, tokens_to_remove: List[str], replace_token=""):
def __init__(self, tokens_to_remove: Iterable[str], replace_token=""):
self.tokens_to_remove = tokens_to_remove
self.replace_token = replace_token

Expand Down Expand Up @@ -267,7 +267,7 @@ def process_list(self, inp: List[str]):


class SubstituteRegexes(AbstractTransform):
"""
r"""
Transform strings by substituting substrings matching regex expressions into
another substring.

Expand Down
Loading