From 314aba35d06eb80be0c5ffc068774bb9bca38e76 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Thu, 15 Apr 2021 23:31:07 -0700 Subject: web: initial implementation of fuzzy citation parsing and matching tool --- python/fatcat_web/templates/reference_match.html | 86 ++++++++++++++++++++++++ 1 file changed, 86 insertions(+) create mode 100644 python/fatcat_web/templates/reference_match.html (limited to 'python/fatcat_web/templates/reference_match.html') diff --git a/python/fatcat_web/templates/reference_match.html b/python/fatcat_web/templates/reference_match.html new file mode 100644 index 00000000..042b0607 --- /dev/null +++ b/python/fatcat_web/templates/reference_match.html @@ -0,0 +1,86 @@ +{% extends "base.html" %} +{% import "entity_macros.html" as entity_macros %} +{% import "edit_macros.html" as edit_macros %} + +{% block body %} + +

Reference Fuzzy Match Tool

+ +
+ + +

Parse Citation

+ +

Enter a citation string here and we will try to parse it (using GROBID) + into a structured format, then match against the catalog. + + {{ edit_macros.form_field_basic(form.raw_citation) }} + + + +
+ {% if grobid_status == "success" and grobid_dict %} +

+
Parsed successfully! See match results below
+ {{ entity_macros.extra_metadata(grobid_dict) }} +
+ {% endif %} + +
+
+

Fuzzy Match Metadata

+ +

Enter whatever bibliographic metadata fields you know, and we will try to + match to catalog entries. + +

NOTE: if you already know a persistent identifier (like a DOI), you + should use the lookup tool instead. + + {{ edit_macros.form_field_inline(form.title) }} + {{ edit_macros.form_field_inline(form.first_author) }} + +
+

+ {{ edit_macros.form_field_basic(form.year) }} + {{ edit_macros.form_field_basic(form.journal) }} +
+
+ {{ edit_macros.form_field_basic(form.volume) }} + {{ edit_macros.form_field_basic(form.issue) }} + {{ edit_macros.form_field_basic(form.pages) }} +
+ + +
+ +
+ +{% if matches is defined %} +
+
+

Match Results

+ + + {% for match in matches %} + +
+
{{ match.status.name }} +
{{ match.reason.name }} +
+ {{ entity_macros.release_summary(match.release) }} + + {% if match.access_options %} + {{ match.access_options[0].access_type.name }} + {% endif %} + {% endfor %} +
+ {% if not matches %} +

None! + {% endif %} +{% endif %} + +{% endblock %} -- cgit v1.2.3 From 7498fb076d0b60a9021f7174f0a5c4ead38c151a Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Thu, 24 Jun 2021 18:46:45 -0700 Subject: match UI: improve form layout --- python/fatcat_web/templates/reference_match.html | 29 +++++++++++++----------- 1 file changed, 16 insertions(+), 13 deletions(-) (limited to 'python/fatcat_web/templates/reference_match.html') diff --git a/python/fatcat_web/templates/reference_match.html b/python/fatcat_web/templates/reference_match.html index 042b0607..ae6a239c 100644 --- a/python/fatcat_web/templates/reference_match.html +++ b/python/fatcat_web/templates/reference_match.html @@ -38,19 +38,22 @@

NOTE: if you already know a persistent identifier (like a DOI), you should use the lookup tool instead. - {{ edit_macros.form_field_inline(form.title) }} - {{ edit_macros.form_field_inline(form.first_author) }} - -
-

- {{ edit_macros.form_field_basic(form.year) }} - {{ edit_macros.form_field_basic(form.journal) }} -
-
- {{ edit_macros.form_field_basic(form.volume) }} - {{ edit_macros.form_field_basic(form.issue) }} - {{ edit_macros.form_field_basic(form.pages) }} -
+
+
+ {{ edit_macros.form_field_basic(form.title) }} +
+
+ {{ edit_macros.form_field_basic(form.first_author) }} +
+
+ {{ edit_macros.form_field_basic(form.journal) }} +
+
+ {{ edit_macros.form_field_basic(form.year) }} + {{ edit_macros.form_field_basic(form.volume) }} + {{ edit_macros.form_field_basic(form.issue) }} + {{ edit_macros.form_field_basic(form.pages) }} +
+ +
+ -
{% if grobid_status == "success" and grobid_dict %}
-
Parsed successfully! See match results below
+
Parsed Citation String
{{ entity_macros.extra_metadata(grobid_dict) }} +

See below for fuzzy match results

{% endif %} -
-
-

Fuzzy Match Metadata

+
+

Fuzzy Match Metadata

-

Enter whatever bibliographic metadata fields you know, and we will try to - match to catalog entries. +

Enter whatever bibliographic metadata fields you know, and we will try to + match to catalog entries. -

NOTE: if you already know a persistent identifier (like a DOI), you - should use the lookup tool instead. +

NOTE: if you already know a persistent identifier (like a DOI), you + should use the lookup tool instead. -
-

- {{ edit_macros.form_field_basic(form.title) }} -
-
- {{ edit_macros.form_field_basic(form.first_author) }} -
-
- {{ edit_macros.form_field_basic(form.journal) }} -
-
- {{ edit_macros.form_field_basic(form.year) }} - {{ edit_macros.form_field_basic(form.volume) }} - {{ edit_macros.form_field_basic(form.issue) }} - {{ edit_macros.form_field_basic(form.pages) }} -
+
+
+ {{ edit_macros.form_field_basic(form.title) }} +
+
+ {{ edit_macros.form_field_basic(form.first_author) }} +
+
+ {{ edit_macros.form_field_basic(form.journal) }} +
+
+ {{ edit_macros.form_field_basic(form.year) }} + {{ edit_macros.form_field_basic(form.volume) }} + {{ edit_macros.form_field_basic(form.issue) }} + {{ edit_macros.form_field_basic(form.pages) }} +
- -
+ +
+
{% if matches is defined %} -
-
-

Match Results

+

Matched Releases

+ + {% if not matches %} +

No matches found + {% endif %} + {% for match in matches %} @@ -81,9 +87,7 @@ {% endfor %}
- {% if not matches %} -

None! - {% endif %} + {% endif %} {% endblock %} -- cgit v1.2.3