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

spiegel.de: falsche Artikel Ersetzung #447

Open
BreiteSeite opened this issue Mar 27, 2024 · 3 comments
Open

spiegel.de: falsche Artikel Ersetzung #447

BreiteSeite opened this issue Mar 27, 2024 · 3 comments

Comments

@BreiteSeite
Copy link

Artikel https://www.spiegel.de/ausland/terrorgefahr-in-deutschland-experte-warnt-vor-anschlaegen-der-afghanischen-terrorgruppe-a-f95ccaaa-167d-4e2f-a731-b50d43fcae79

wird ersetzt durch:
https://bib-voebb.genios.de/document/SPPL__d2ec496a062e0ec7bec461fbc0661b2a3a20a5f9

sollte aber ersetzt werden durch:
https://bib-voebb.genios.de/document/SPPL__94bc036b05f5a3523098c8a417e1a5fa80bd8abd

Die eigentlichen Artikel hab ich gefunden indem ich "Bei dem Terroranschlag in Moskau starben 137 Menschen" bei genios gesucht habe (falls das hilft).

@eengnr
Copy link
Contributor

eengnr commented Mar 28, 2024

Putting the '.leading-loose' first in

query: makeQueryFunc(['.leading-tight span:not(:first-child), .leading-none .leading-normal, h2 span:not(:first-child) span:not(:first-child)', '.leading-loose'], false),
could fix this.
But in this special case it's also necessary to slice here from 2 to 10 instead of 15:
let query = text.split(' ').slice(2, 15).join(' ').replace('"', '')

Otherwise the correct article is not found, because one word is different.

Perhaps it's worth a try, I also had issues with articles on SpOn which were not mapped correctly. Preferring the '.leading-loose' could lead to better results.

If necessary I could provide a PR.

@Paul0k
Copy link

Paul0k commented May 15, 2024

Could you please provide a PR or do you got another hint?
I'm trying to fix it. I found the right line of code. But all my "fixes" aren't working.

@stefanw
Copy link
Owner

stefanw commented May 16, 2024

The selector query func utils now allow for custom slice ranges if that helps. 86ff5ca

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

4 participants