International Association for Cryptologic Research

International Association
for Cryptologic Research

CryptoDB

API for autocomplete of author names

In systems that incorporate human-entered content into cryptodb, it is important to match authors to existing records, because names are not sufficiently unique identifiers for authors or committee members. For example, the authors Nigel Smart and N. Smart and Nigel P. Smart are probably the same person, but a database has a hard time determining this.

For this reason, I now provide an auto-complete system that will automatically match what the user types against existing names in the cryptodb database. An example is shown here:


If forms for program committees and paper submission use this, then it will eliminate downstream confusion about names. We plan to add ORCID IDs to this API in the future.
The method for accomplishing this is to insert the following script in the <head> of the document:
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1/jquery-ui.min.js"></script>
<script type="text/javascript">
$(function() {
   // apply autocomplete to the author class
  $(".author").autocomplete({
    source: "/cryptodb/data/jquery/query.php",
    minLength: 2,
    scrollHeight: 200,
    contentType: "application/json; charset=utf-8",
    max: 50,
    select: function(event, ui) {
     var id = $(this).attr('id');
     var index = id.split("_")[1];
     $("#author_id_" + index).val(ui.item.id);
    }
   });
   
  });
</script>
Then put a form containing the following fields:
<input type="text" class="author" id="author_1">
<input type="text" id="author_id_1">

<input type="text" class="author" id="author_2">
<input type="text" id="author_id_2">
This uses the jquery autocomplete API to request extensions of the string the user types, and fills in the ID corresponding to the author that is selected. It should be pretty obvious how to modify the script to perform other actions rather than setting author_id. If you want to see what data is returned, try http://www.iacr.org/cryptodb/data/jquery/query.php?term=Ivan.