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

Add recall inference similarity #1507

Merged
merged 5 commits into from
Dec 25, 2021
Merged

Conversation

w5688414
Copy link
Contributor

PR types

New features

PR changes

Models

Description

add recall inference similarity code

@tianxin1860 tianxin1860 self-requested a review December 24, 2021 05:34
Copy link

@tianxin1860 tianxin1860 left a comment

Choose a reason for hiding this comment

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

计算文本相似度的示例给定 2 个文本对更容易理解一些,1 个文本对的话,看起来嵌套了 2 层列表

id2corpus={0:'国有企业引入非国有资本对创新绩效的影响——基于制造业国有上市公司的经验证据'}
# 计算相似度
corpus_list=[['中西方语言与文化的差异','中西方文化差异以及语言体现中西方文化,差异,语言体现']]

Choose a reason for hiding this comment

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

列表示例中给出 2 个文本对吧,第 2 个凸显出和 '中西方语言与文化的差异' 语义不相似的示例就行,这样用户好理解一些。

Copy link
Contributor Author

Choose a reason for hiding this comment

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

修改了

print(res.shape)
print(res)
corpus_list=[['中西方语言与文化的差异','中西方文化差异以及语言体现中西方文化,差异,语言体现']]

Choose a reason for hiding this comment

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

同上

Copy link
Contributor Author

Choose a reason for hiding this comment

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

修改

id2corpus={0:'国有企业引入非国有资本对创新绩效的影响——基于制造业国有上市公司的经验证据'}
# 计算相似度
corpus_list=[['中西方语言与文化的差异','中西方文化差异以及语言体现中西方文化,差异,语言体现']]

Choose a reason for hiding this comment

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

同上

Copy link
Contributor Author

Choose a reason for hiding this comment

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

修改

print(res.shape)
print(res)
corpus_list=[['中西方语言与文化的差异','中西方文化差异以及语言体现中西方文化,差异,语言体现']]

Choose a reason for hiding this comment

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

同上

Copy link
Contributor Author

Choose a reason for hiding this comment

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

修改了

tianxin1860
tianxin1860 previously approved these changes Dec 24, 2021
Copy link

@tianxin1860 tianxin1860 left a comment

Choose a reason for hiding this comment

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

LGTM

@ZeyuChen ZeyuChen changed the title add recall inference similarity Add recall inference similarity Dec 24, 2021
@ZeyuChen
Copy link
Member

@w5688414 请更新下目录,从application->applications

@ZeyuChen ZeyuChen merged commit 843c69a into PaddlePaddle:develop Dec 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants