-
Notifications
You must be signed in to change notification settings - Fork 10
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
A error when I use “splitter.split_by_sentences_wrapper”,please help check the error #7
Comments
Hi! Please, provide the text you trying to split and the lang_code. |
I got the same error. I followed this article, so there is no lang_from = "ru"
lang_to = "en" |
|
Hello! Here is the working Colab https://colab.research.google.com/drive/1_ics0YzWg5qIZIPhA1X_Wbfg0XZzRO-p Please, try it with your texts. Let me know in case of further errors. |
Hello @averkij I am facing the same issue: TypeError: split_by_sentences_wrapper() got an unexpected keyword argument 'leave_marks' In the following code I deliberatly left out the parameter "leave_marks" from the splitted_from and splitted_to variables because the source text is already kind of preformatted. Could you please help me out? Thanks import os text1_input = "HarryPotterSteinDerWeise.rtf" with open(text1_input, "r", encoding="utf8") as input1: with open(text2_input, "r", encoding="utf8") as input2: db_path = "book.db" lang_from = "de" models = ["sentence_transformer_multilingual", "sentence_transformer_multilingual_labse"] text1_prepared = preprocessor.mark_paragraphs(text1) splitted_from = splitter.split_by_sentences_wrapper(text1_prepared , lang_from) if os.path.isfile(db_path): aligner.fill_db(db_path, splitted_from, splitted_to) |
when I use “splitted_from = splitter.split_by_sentences_wrapper(text1_prepared, lang_from)” return list,
But I see that there will be a conflict when insert sqlite ,specific error:
File "ling_test.py", line 36, in
aligner.fill_db(db_path, splitted_from, splitted_to)
File "lingtrain_aligner/aligner.py", line 498, in fill_db
db.executemany("insert into languages(key, val) values(?,?)", [("from", lang_from), ("to", lang_to)])
sqlite3.InterfaceError: Error binding parameter 1 - probably unsupported type.
The text was updated successfully, but these errors were encountered: