Add plain citation parsing with LLM#11831
Conversation
|
"Parser choice" is nice.
|
|
I would propose a tab layout (e.g. like in OO style selection dialog) between Grobid/OpenAI |
The selection of the service is done very raRely. Thus. I Like the approach. The selection should persist across sessions. |
|
Haven't tested the PR yet, but the screenshots show a divergence between the header of the window and the warning. "Plain references parser (online)" vs "plain citation parsing" It should not differ. |
|
|
With "this" I meant the new preference that was showing in #11831 (comment) under web-search. |
|
AI (LLMs) can be both online and offline. |
Therefore "online" and "offline" are requested to be removed. See #11831 (comment) |
Since we don't have a tab "Import" and I don't think, this is so important, I propose it too keep it in the tab. However (!), please move it to the "Remote services" part. There, we already have Grobid-related stuff. |
|
This is not GUI. I also propose to change the name to This aligns very well with the history of natural lanuguage processing (NLP):
|
|
I also propose to change all names to "Plain Citation Parsing". Synonyms are:
|
|
WAIT All of this time offline parsing did not support parsing of several entries (separated by two blank lines)? WTF |
Ah, this is not that easy |
|
We had an instance of grobid running on azure but currently I cannot deploy it again due to some weird errors from docker |
…dd-llm-citation-parsing # Conflicts: # src/test/java/org/jabref/logic/importer/WebFetchersTest.java
|
Did some crazy refactoring. Hope you like it |
There was a problem hiding this comment.
Some small nitpicks.
And
- When opening the dialog, it should check whether the current value is still available. Example: GROBID enabled, dialog opened, GROBID selected, then preferences: GROBID disabled. Opening dialog again: GROBID should not be selected. (Note that GROBID is not in the dropdown, which is OK. However, it is selected)
- Link org.jabref.logic.importer.plaincitation.RuleBasedPlainCitationParser and
org.jabref.logic.importer.fileformat.BibliographyFromPdfImporter#parseReferencewith aTODO(at both sides, with{@link}. They are semantically equal, but the code is different. Someone should unify the functionality.- Similar: Link
org.jabref.logic.importer.plaincitation.SeveralPlainCitationParserandorg.jabref.logic.importer.fileformat.BibliographyFromPdfImporter#getIntermediateData
- Similar: Link
Note: for reviewing this PR, refactoring miner is better.
E.g., instead of thinking a file was deleted, there is detection of major refactorings
|
@koppor, I thought it will be easy to filter out parser choices But we can't (currently, or without a hack) link preferences from different tabs. At first, I used |
|
Okay, GROBID is on the same page, but AI is not. Is a hack worth it? |
I don't fully understand ^^. - I just guess: It is OK for me if the dropdown for default in the web search contains an entry which is available at another setting... |
It should be possible to get the AIPreferences passed.
Sounds good!
I don't understand. Its a hiearchy - and the class for GuiPreferences is a superset of the CliPreferences |
koppor
left a comment
There was a problem hiding this comment.
Very small improvement. I think, this is NOT a dirty hack, but a good solution.
…Model.java Co-authored-by: Oliver Kopp <kopp.dev@gmail.com>
JabRef/jabref#11831 Move And Rename Method public performSearch(searchQuery String) : List<BibEntry> from class org.jabref.logic.importer.fetcher.GrobidCitationFetcher to public parseSeveralPlainCitations(text String) : List<BibEntry> from class org.jabref.logic.importer.plaincitation.SeveralPlainCitationParser Extract Method public splitCitations(text String) : Stream<String> extracted from public performSearch(searchQuery String) : List<BibEntry> in class org.jabref.logic.importer.plaincitation.SeveralPlainCitationParser Rename Parameter searchQuery : String to text : String in method public parseSeveralPlainCitations(text String) : List<BibEntry> from class org.jabref.logic.importer.plaincitation.SeveralPlainCitationParser
JabRef/jabref#11831 Move And Rename Method public performSearch(searchQuery String) : List<BibEntry> from class org.jabref.logic.importer.fetcher.GrobidCitationFetcher to public parseSeveralPlainCitations(text String) : List<BibEntry> from class org.jabref.logic.importer.plaincitation.SeveralPlainCitationParser Extract Method public splitCitations(text String) : Stream<String> extracted from public performSearch(searchQuery String) : List<BibEntry> in class org.jabref.logic.importer.plaincitation.SeveralPlainCitationParser Rename Parameter searchQuery : String to text : String in method public parseSeveralPlainCitations(text String) : List<BibEntry> from class org.jabref.logic.importer.plaincitation.SeveralPlainCitationParser







Closes #11825
Closes #11805
Implements #11825 (comment).
Updated dialog for online parsing:

Updated dialog for offline parsing:

New setting:

Mandatory checks
CHANGELOG.mddescribed in a way that is understandable for the average user (if applicable)- [ ] Tests created for changes (if applicable)