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

add pdf to bib #12138

Merged
merged 4 commits into from
Oct 31, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,9 @@ private boolean isUnwantedText(TextPosition previousTextPosition, TextPosition t
if (textPosition == null || previousTextPosition == null) {
return false;
}
if (" ".equals(textPosition.getUnicode())) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think, there could be multiple spaces etc.

Suggested change
if (" ".equals(textPosition.getUnicode())) {
if (StringUtil.isBlank(textPosition.getUnicode())) {

return true;
}
// The title usually don't in the bottom 10% of a page.
if ((textPosition.getPageHeight() - textPosition.getYDirAdj())
< (textPosition.getPageHeight() * 0.1)) {
Expand Down Expand Up @@ -298,7 +301,7 @@ private boolean isThereSpace(TextPosition previous, TextPosition current) {
float YspaceThreshold = previous.getFontSizeInPt();
float Xgap = current.getXDirAdj() - (previous.getXDirAdj() + previous.getWidthDirAdj());
float Ygap = current.getYDirAdj() - (previous.getYDirAdj() - previous.getHeightDir());
return Xgap > XspaceThreshold || Ygap > YspaceThreshold;
return Math.abs(Xgap) > XspaceThreshold || Math.abs(Ygap) > YspaceThreshold;
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ void pdfTitleExtraction(String expectedTitle, String filePath) throws Exception

private static Stream<Arguments> providePdfData() {
return Stream.of(
Arguments.of("Fundamentals of Distributed Computing: A Practical Tour of Vector Clock Systems", "/pdfs/PdfContentImporter/Roberto2002.pdf"),
Arguments.of("Fundamentals of Distributed Computing: A Practical Tour of Vector Clock Systems", "/pdfs/PdfContentImporter/Baldoni2002.pdf"),
Arguments.of("On How We Can Teach – Exploring New Ways in Professional Software Development for Students", "/pdfs/PdfContentImporter/Kriha2018.pdf"),
Arguments.of("JabRef Example for Reference Parsing", "/pdfs/IEEE/ieee-paper.pdf"),
Arguments.of("Paper Title", "/org/jabref/logic/importer/util/LNCS-minimal.pdf"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,3 +126,12 @@ @inproceedings{Keim2024TraceLinks
doi = {10.1145/3597503.3639130}
}

@inproceedings{Baldoni2002Fundamentals,
author = {Roberto Baldoni and Matthias Klusch}
abstract = {A distributed computation consists of a set of processes that cooperate to achieve a common goal. A main characteristic of these computations is that the processes do not already share a common global memory and that they communicate only by exchanging messages over a communication network. Moreover, message transfer delays are finite yet unpredictable. This computation model defines what is known as the asynchronous distributed system model, which includes systems that span large geographic areas and are subject to unpredictable loads.}
title = {Fundamentals of Distributed Computing: A Practical Tour of Vector Clock Systems}
url = {https://www.computer.org/csdl/magazine/ds/2002/02/o2001/13rRUEgs2Q8}
year = {2002}
file = {Baldoni2002.pdf}
doi = {}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove this line. - We do not distinguish between "unknown DOI" and no DOI available.

}
Loading