[BUG]: Article cleaner removes boilerplate phrases from inside article sentences
評価
調査の方向性
Start in backend/app/modules/scraper/cleaner.py at clean_extracted_text; run the reproduction snippet to see the sentence truncation and the about us word cut. Compare how phrases ending in .* and short phrases like about us are matched, then restrict removal to whole boilerplate lines. Add tests covering lines that should be removed and article sentences that must survive; done when the snippet returns both sentences intact.
索引モデルが issue の本文から書いたものです。
説明
Description
clean_extracted_text in backend/app/modules/scraper/cleaner.py removes its boilerplate phrases wherever they appear in the article, not only on boilerplate lines. So it also changes the article text itself:
- Phrases that end in
.*remove the rest of the sentence. An article line like "An engine powered by hydrogen could drive a car for five hundred kilometres." becomes "An engine", because ofpowered by .*. The same happens withphoto by.*,read more at.*,disclaimer:.*and the others. - Short phrases are cut out of words.
about usturns "Readers asked about using the new tool" into "Readers asked ing the new tool".
The cleaned text is what the bias check, fact check and perspective steps get, so they work on a damaged article.
Steps to reproduce
from app.modules.scraper.cleaner import clean_extracted_text
print(clean_extracted_text(
"An engine powered by hydrogen could drive a car for five hundred kilometres.\n"
"Readers asked about using the new tool in newsrooms around the world."
))
The first sentence is reduced to "An engine" (and then dropped as too short), and the second loses "about us".
Expected
Only lines that are boilerplate (for example a line starting with "Read more at" or "Sign up for our newsletter") are removed, and article sentences stay as they are.
I have a fix with tests ready and will open a PR.
- 主要言語
- TypeScript
- スター
- 58
- フォーク
- 90
- 平均マージ
- 11時間 51分
- マージ済み PR(30日)
- 3
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
AOSSIE-Org/Perspective のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
AOSSIE-Org/Perspective#191 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
AOSSIE-Org/Perspective#190 ·
-
[BUG]: Missing input validation in URlRequest and ChatQuery causes 500 crashes and wasteful scraper execution対応中かも @agarwalpranav0711 が 25 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
AOSSIE-Org/Perspective#178 ·
-
[BUG]: chunk_rag_data crashes with ValueError when perspective is a dict, silently dropping RAG vector storage対応中かも @agarwalpranav0711 が 36 日前に担当しました。 オープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
AOSSIE-Org/Perspective#175 ·
-
[BUG]: Scraper passes headers as query params in requests.get (User-Agent never sent)対応中かも @Th-Shivam が 50 日前に担当しました。 オープンbug
難易度 1/5 1時間未満 初心者へのやさしさ 92/100
AOSSIE-Org/Perspective#161 · コメント 1 件 ·
AOSSIE-Org/Perspective の issue をすべて見る
似ている issue
-
documentation lens:human needs-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 73/100
thebristolsound/birdbrain#2246 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
bug ready-for-human
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
BoardGamesEmpire/board-games-empire-backend#1452 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
good first issue stretch
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信