Skip to content

Commit

Permalink
added crud/nlp_crud.py
Browse files Browse the repository at this point in the history
  • Loading branch information
AthulyaMS committed Jan 8, 2024
1 parent 98fc414 commit d7a67c7
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions app/crud/nlp_crud.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def get_project_tokens(db_:Session, project_id, books, sentence_id_range, senten
raise NotAvailableException(f"Project with id, {project_id}, not found")
sentences = projects_crud.obtain_project_source(db_, project_id, books, sentence_id_range,
sentence_id_list)
sentences = sentences['db_content']
# sentences = sentences['db_content']
args = {"db_":db_, "src_language":project_row.sourceLanguage, "sentence_list":sentences,
'trg_language':project_row.targetLanguage,
"use_translation_memory":use_translation_memory, "include_phrases":include_phrases,
Expand All @@ -93,12 +93,12 @@ def get_project_tokens(db_:Session, project_id, books, sentence_id_range, senten
args['stopwords'] = project_row.metaData['stopwords']
if "punctuations" in project_row.metaData:
args['punctuations'] = project_row.metaData['punctuations']
# return get_generic_tokens( **args)
response = {
'db_content':get_generic_tokens( **args),
'project_content':project_row
}
return response
return get_generic_tokens( **args)
# response = {
# 'db_content':get_generic_tokens( **args),
# 'project_content':project_row
# }
# return response

###################### Token replacement translation ######################
def replace_bulk_tokens_gloss_list(token_translations, updated_sentences):
Expand Down

0 comments on commit d7a67c7

Please sign in to comment.