mirror of
https://github.com/Monadical-SAS/reflector.git
synced 2025-12-20 12:19:06 +00:00
* feat: use llamaindex for transcript final title too * refactor: removed llm backend, replaced with one single class+llamaindex * refactor: self-review * fix: typing * fix: tests * refactor: extract clean_title and add tests * test: fix * test: remove ensure_casing/nltk * fix: tiny mistake
22 lines
690 B
Python
22 lines
690 B
Python
import pytest
|
|
|
|
from reflector.utils.text import clean_title
|
|
|
|
|
|
@pytest.mark.parametrize(
|
|
"input_title,expected",
|
|
[
|
|
("hello world", "Hello World"),
|
|
("HELLO WORLD", "Hello World"),
|
|
("hello WORLD", "Hello World"),
|
|
("the quick brown fox", "The Quick Brown fox"),
|
|
("discussion about API design", "Discussion About api Design"),
|
|
("Q1 2024 budget review", "Q1 2024 Budget Review"),
|
|
("'Title with quotes'", "Title With Quotes"),
|
|
("'title with quotes'", "Title With Quotes"),
|
|
("MiXeD CaSe WoRdS", "Mixed Case Words"),
|
|
],
|
|
)
|
|
def test_clean_title(input_title, expected):
|
|
assert clean_title(input_title) == expected
|