feat(corp/data-import): add import of OR 'translations' table
The original dataset contains translations into different languages, but only the English ones are imported here. Note that translations are for lemmata only. Change-Id: Ifb9c32c25fda44c38ad899efca9d205c520c0fa3 Reviewed-on: https://cl.tvl.fyi/c/depot/+/7895 Reviewed-by: tazjin <tazjin@tvl.su> Tested-by: BuildkiteCI
This commit is contained in:
parent
2b308c64b9
commit
ed8dd4acd7
3 changed files with 70 additions and 0 deletions
|
|
@ -228,6 +228,15 @@ fn open_russian(conn: &Connection, args: &Args) {
|
|||
tx.commit().ensure("OpenRussian word forms commit failed");
|
||||
}
|
||||
|
||||
{
|
||||
let tx = conn
|
||||
.unchecked_transaction()
|
||||
.ensure("failed to start transaction");
|
||||
|
||||
db_setup::insert_or_translations(&tx, parser.translations());
|
||||
tx.commit().ensure("OpenRussian translations commit failed");
|
||||
}
|
||||
|
||||
info!("finished OpenRussian import");
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue