Skip to content
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

Fix FAQ docx ui upload parsing support and reformat docx.py #3645

Merged
merged 5 commits into from
Nov 2, 2022

Conversation

w5688414
Copy link
Contributor

@w5688414 w5688414 commented Nov 2, 2022

PR types

  • Bug fixes

PR changes

  • APIs

Description

  • Support FAQ ui upload parsing support
  • Fix and reformat docx.py for parsing docx files

n=split_length,
step=split_length - split_overlap)
else:
segments = windowed(elements,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个if else 看起来是不必要,直接通过split_overlap数值来决定就行

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

已修改

if "meta" not in doc.keys() or doc["meta"] is None:
doc["meta"] = {}
if (split_answers):
text_arr = doc["content"].split('\t')
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

split_answers 具体是代表啥含义了?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FAQ智能问答需要读取文件的问答对,split_answers表示把问答对按照\t分开

Copy link
Collaborator

@wawltor wawltor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@w5688414 w5688414 merged commit ff546f6 into PaddlePaddle:develop Nov 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants