Import Kaerlein bibliography into JabRef
The site http://kristallin.de/Kaerlein/Kaerlein.html links a PDF with many pages of references. These need to be imported into JabRef.
We need a fallback mechansim routing each PDF page to our AI provider.
Tasks
- [ ] Add documentation on "New library based on references in PDF file..."
- [ ] Find code
- [ ] Find test cases
- [ ] Craft documetnation: new
.mdfor https://github.com/JabRef/user-documentation/tree/main/en/collect
- [ ] Try import with Kaerlein
- [ ] Extract one PDF page with Karlein import it using a JUnit case
- [ ] Refine code to match expectations
- [ ] Extract other PDF page. Repeate.
- [ ] Write a JUnit test case importing complete Kaerlein
Thoughts
Prompt (for a single entry)
Convert following to a good BibLaTeX entry. Keep all text. Do not abbreviate any text.
"New Library based on references in PDF file" probalby doesn't work (because its tied to IEEE).
Hi! I'd like to give this issue a try, if that's okay.
Broadly, I’m planning to extend BibliographyFromPdfImporter with the AI fallback mechanism that extracts BibLaTeX references from PDFs if the standard method returns no entries. I think the fallback will:
- (Lazily) initialize a ChatLanguageModel (from langchain4j) using JvmOpenAiChatLanguageModel
- Build prompts per page and send them via the selected provider from AiPreferences (could also do multiple pages – need to test how this affects error likelihood)
- Parse the AI response to generate valid BibEntry objects
I’ll also create a new component (something like ReferenceExtractionAiHandler) to handle AI prompt construction and response parsing. I think those should be all of the primary changes (some other parts need adaptation too, of course).
2 questions I had:
- While the instructions focus on the Kaerlein bibliography, the fallback mechanism seems generic. Would you prefer a generalized implementation that could potentially support any PDF–would be no extra work really since we're using an AI provider? (shouldn't be a difference implementation-wise either – however maybe in terms of API calls?)
- I noticed that NewLibraryFromPdfActionOffline uses BibliographyFromPdfImporter, whereas NewLibraryFromPdfActionOnline uses Grobid. Should the AI fallback be integrated into both workflows, or is the intention to enhance just the offline route? Could be implemented for both (would simply wrap the e.g. Grobid call in a fallback chain), I just wanted to clarify.
- Please do a general implementation
- "Offline" should never use online services.
Frist step: Only in ...Online.
Then: Think how it can be included in ...Offline: A user can configure localhost as AI provider. Then, there is no Internet use. Maybe, the simplest thing is to add a preference "Treat as offline provider*. If checked, then ...Offline uses AI.
/assign-me
👋 Hey @Kaan0029, thank you for your interest in this issue! 🎉
We're excited to have you on board. Start by exploring our Contributing guidelines, and don't forget to check out our workspace setup guidelines to get started smoothly.
In case you encounter failing tests during development, please check our developer FAQs!
Having any questions or issues? Feel free to ask here on GitHub. Need help setting up your local workspace? Join the conversation on JabRef's Gitter chat. And don't hesitate to open a (draft) pull request early on to show the direction it is heading towards. This way, you will receive valuable feedback.
Happy coding! 🚀
⏰ Assignment Reminder
Hi @Kaan0029, this is a friendly reminder about your assignment to this issue.
[!WARNING] This issue will be automatically unassigned in 11 days if there's no activity.
How to keep your assignment
If you are working on it, you can prevent automatic unassignment by:
- Submitting a draft PR with your progress
- Asking for the 📌 Pinned label if you need more time
We appreciate your contribution and are here to help if needed!
@Kaan0029 I assume you are no longer working on this as you may be focusing on your primary project, hence I am freeing the issue. If you wish to take this up again, feel free to assign yourself.
/unassign @Kaan0029
/assign-me
Thank you for your continued work in JabRef. At this point, you probably already know the basics and the important links. If not, our contributing guidelines is the place you should go to.
At this point in time, you raised 14 pull request(s) of which 64% (9/14) have been merged.
/assign-me
Thank you for your continued work in JabRef. At this point, you probably already know the basics and the important links. If not, our contributing guidelines is the place you should go to.
At this point in time, you raised 1 pull request(s) of which 100% (1/1) have been merged.
⏰ Assignment Reminder
Hi @Adityapal67, this is a friendly reminder about your assignment to this issue.
[!WARNING] This issue will be automatically unassigned in 7 days if there's no activity.
Remember that you can ask the JabRef Guru or DeepWiki about anything regarding JabRef. Additionally, our contributing guide has hints on creating a pull request and a link to our Gitter chat.
How to keep your assignment
If you are working on it, you can prevent automatic unassignment by:
- Submitting a draft pull request with your progress within 7 days
- Asking for the 📌 Pinned label if you need more time
We appreciate your contribution and are here to help if needed!
📋 Assignment Update
Hi @Adityapal67, due to inactivity, you have been unassigned from this issue.
Next steps
If you still want to work on this:
- Submit a pull request showing your current state. You will be automatically assigned again.
- Ask a maintainer to assign you again.