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

タイトルに改行が含まれる場合がある #78

Open
yujidn opened this issue May 9, 2022 · 0 comments
Open

タイトルに改行が含まれる場合がある #78

yujidn opened this issue May 9, 2022 · 0 comments

Comments

@yujidn
Copy link
Contributor

yujidn commented May 9, 2022

for article in articles:
url = article['arxiv_url']
title = article['title']
abstract = article['summary']
score, hit_keywords = calc_score(abstract, keywords)
if (score != 0) and (score >= score_threshold):
title_trans = get_translated_text('ja', 'en', title, driver)
abstract = abstract.replace('\n', '')
abstract_trans = get_translated_text('ja', 'en', abstract, driver)

でtitleも改行のreplaceを行なったほうがいいかもしれない、という提案になります。
60行目に以下を挿入するだけになります。

            title = title.replace('\n', '')

例えば以下の論文では改行置換ありなしでdeeplの結果が変わっていました。

url: http://arxiv.org/abs/2205.00779v1

改行置換なし

title:    ゼブラ ゼロブロックによるCNNアクセラレータのメモリ帯域幅の削減
   活性化マップの正則化
title_en:    Zebra: Memory Bandwidth Reduction for CNN Accelerators With Zero Block
 Regularization of Activation Maps

改行置換あり

title:    ゼブラ 活性化マップのゼロブロック正則化を用いたCNNアクセラレータのメモリ帯域幅の削減
title_en:    Zebra: Memory Bandwidth Reduction for CNN Accelerators With Zero Block  Regularization of Activation Maps

論文のタイトルには改行が含まれておらず、arxiv.queryの結果には含まれているのでarxiv.queryのところで何とかして欲しい気持ちですが、↓を見る限りは使う側で対処した方が良さそうかなという感じです。

lukasschwab/arxiv.py#48

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

No branches or pull requests

1 participant