Skip to content

Marekhorst 1614 integrate ec erasmus plus projects mining#1617

Closed
marekhorst wants to merge 4 commits into
masterfrom
marekhorst_1614_Integrate_EC_ERASMUSplus_projects_mining
Closed

Marekhorst 1614 integrate ec erasmus plus projects mining#1617
marekhorst wants to merge 4 commits into
masterfrom
marekhorst_1614_Integrate_EC_ERASMUSplus_projects_mining

Conversation

@marekhorst

Copy link
Copy Markdown
Member

No description provided.

johnfouf and others added 4 commits July 13, 2026 17:20
Integrating mining update and supplementing the integration test suite with the ERASMUS+ matching case.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR extends the project reference-extraction workflow to recognize and link EC ERASMUS+ grant IDs (e.g., 2021-1-TR01-KA220-VET-000028090) from document text, and updates the end-to-end sample test data accordingly.

Changes:

  • Add ERASMUS+ grant-ID matching logic to the SQLite extraction query (projects.sql).
  • Adjust grant “normalized acronym” generation for ERASMUS+ projects in the project DB build script (buildprojectdb.sql).
  • Update the sample workflow’s test inputs/expected outputs and report counters to include the new ERASMUS+ example.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
iis-wf/iis-wf-referenceextraction/src/test/resources/eu/dnetlib/iis/wf/referenceextraction/project/data/report_funder.json Updates expected per-funder and total counters for the new extracted reference.
iis-wf/iis-wf-referenceextraction/src/test/resources/eu/dnetlib/iis/wf/referenceextraction/project/data/project.json Adds an ERASMUS+ project record used by the sample workflow test.
iis-wf/iis-wf-referenceextraction/src/test/resources/eu/dnetlib/iis/wf/referenceextraction/project/data/document_to_project.json Adds expected document→project linkage for the new ERASMUS+ grant mention and normalizes one snippet.
iis-wf/iis-wf-referenceextraction/src/test/resources/eu/dnetlib/iis/wf/referenceextraction/project/data/document_text.json Adds a document text containing an ERASMUS+ grant mention used for extraction.
iis-wf/iis-wf-referenceextraction/src/main/resources/eu/dnetlib/iis/wf/referenceextraction/project/sqlite_builder/oozie_app/lib/scripts/buildprojectdb.sql Updates normalized identifier logic for ERASMUS+ projects during grants DB build.
iis-wf/iis-wf-referenceextraction/src/main/resources/eu/dnetlib/iis/wf/referenceextraction/project/main_sqlite/oozie_app/lib/scripts/projects.sql Adds a new UNION branch to extract ERASMUS+ grant IDs from document text and join them to grants.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +204 to +207
select regexprfindall("(\d{4}-? ?\d-? ?[A-Z]{2}\d{2}-? ?[A-Z]{2}\d{3}-? ?[A-Z]{3}-? ?[\d]{9})", prev||middle) as regexpr_prev_middle, docid, middle, prev, next
from ( setschema 'docid,prev,middle,next' select c1, textwindow2s(regexpr("\n",c2," "), 10, 1, 10, "\d{9}") from pubs )
where regexpr_prev_middle is not null
)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I have run integration tests, the ERASMUS+ case was covered and no runtime error was spotted. In theory it is possible some block of code might not get executed but I doubt this is the case here.

@johnfouf do you think this Copilot comment is relevant or should we discard it because Madis supports this kind of clauses?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot is wrong, this works in SQLite - although it is undocumented, nonstandard and SQLite author regrets it: https://www.mail-archive.com/sqlite-users@mailinglists.sqlite.org/msg94070.html

May also be bad for performance. If adding yet another query nesting level would be better or even worse would have to be tested on real data.

@marekhorst
marekhorst requested a review from mpol July 14, 2026 08:26

@mpol mpol left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks ok, possibly apart from the nonstandard use of alias in WHERE.

Comment on lines +204 to +207
select regexprfindall("(\d{4}-? ?\d-? ?[A-Z]{2}\d{2}-? ?[A-Z]{2}\d{3}-? ?[A-Z]{3}-? ?[\d]{9})", prev||middle) as regexpr_prev_middle, docid, middle, prev, next
from ( setschema 'docid,prev,middle,next' select c1, textwindow2s(regexpr("\n",c2," "), 10, 1, 10, "\d{9}") from pubs )
where regexpr_prev_middle is not null
)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot is wrong, this works in SQLite - although it is undocumented, nonstandard and SQLite author regrets it: https://www.mail-archive.com/sqlite-users@mailinglists.sqlite.org/msg94070.html

May also be bad for performance. If adding yet another query nesting level would be better or even worse would have to be tested on real data.

@marekhorst

Copy link
Copy Markdown
Member Author

Merged with the master branch with this rebased and squashed commit: 23f92f3.

@marekhorst marekhorst closed this Jul 15, 2026
@marekhorst marekhorst mentioned this pull request Jul 17, 2026
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

Successfully merging this pull request may close these issues.

4 participants