Skip to content

Commit

Permalink
Fix Akkadian
Browse files Browse the repository at this point in the history
  • Loading branch information
kylepjohnson authored and clemsciences committed Nov 4, 2023
1 parent 4ec9016 commit cb535f4
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 11 deletions.
7 changes: 7 additions & 0 deletions notebooks/Demo of Pipeline for all languages.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,13 @@
" a_tree.print_tree()\n",
" print(\"\")"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
Expand Down
24 changes: 13 additions & 11 deletions src/cltk/languages/pipelines.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,17 +73,19 @@ class AkkadianPipeline(Pipeline):
<class 'cltk.tokenizers.processes.AkkadianTokenizationProcess'>
"""

description: str
language: Language
processes: List[Type[Process]]

def __init__(
self, processes=None, description="Pipeline for the Akkadian language."
):
language = get_lang("akk")
if not processes:
processes = [AkkadianTokenizationProcess, StopsProcess]
super().__init__(language, description, processes)
description: str = "Pipeline for the Akkadian language."
language: Language = get_lang("akk")
processes: List[Type[Process]] = field(
default_factory = lambda: [AkkadianTokenizationProcess, StopsProcess]
)

# def __init__(
# self, processes=None, description="Pipeline for the Akkadian language."
# ):
# language: Language = get_lang("akk")
# if not processes:
# processes = [AkkadianTokenizationProcess, StopsProcess]
# super().__init__(language, description, processes)


@dataclass
Expand Down

0 comments on commit cb535f4

Please sign in to comment.