INSPIRE-specific utils.
inspirehep / inspire-utils Goto Github PK
View Code? Open in Web Editor NEWINSPIRE-specific utils.
License: GNU General Public License v3.0
INSPIRE-specific utils.
License: GNU General Public License v3.0
HumanName
supports capitalization of names (related docs).
Currently, we have capitalization enabled, which does a best effort to capitalize names.
Although, without the force=True
it doesn't do anything on mixed case names.
In addition to the example from their docs, the same happens for names like: Ellis, john
, the result will be the same, and not Ellis, John
.
For the aforementioned case it seems logical to use it, but for the case of their example Shirley Maclaine
(converting it to Shirley MacLaine
) I don't know.
@michamos @jacquerie
It's not something that I need for authors search, but something to keep in mind and decide upon.
From @jacquerie on August 26, 2017 23:9
From @annetteholtkamp on August 18, 2017 15:13
A name with concatenated capital initials like "Fitzakerley, DW" should be converted to
"Fitzakerley, D.W."
ex: https://inspirehep.net/record/1488707
This conversion should only happen, if the family name is not all caps since we may encounter Chinese names like "SHI, YU"
Currently, cataloguers have to change this manually which is painful for long author lists and may easily be overlooked. In the current system I believe this may generate superfluous new author profiles.
Copied from original issue: inspirehep/inspire-next#2662
Copied from original issue: inspirehep/inspire-schemas#221
>>> from inspire_utils import normalize_name
>>> normalize_name('W, Schoutens.')
'W, Schoutens' # should be 'Schoutens, W.'
>>> normalize_name(u'Erdélyi,A.')
'A.' # should be u''Erdélyi, A.'
it would be nice to be able to call it on a list
of dict
s also, e.g. https://github.com/michamos/inspire-next/blob/6481afdb3bf52e25c6b99b52ecf534d3cca7cdd3/tests/unit/editor/test_editor_views.py#L54 instead of using the workaround of wrapping it in a dict
.
Because it's the right thing to do.
HumanName
should recognize the K.F.
part as two names, like K. F.
or at least they should be transformed into two post-HumanName-creation.
This comes from record 1516788
.
Just like normalize_date
does:
inspire-utils/inspire_utils/date.py
Line 196 in a3d3022
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.