let field_name_of_string: string -> field_name = function
| "id" -> `id
| "authors" -> `authors
| "title" -> `title
| "how" -> `how
| "year" -> `year
| "url" -> `url
| "pdfurl" -> `pdfurl
| "comment" -> `comment "main"
| s when (Str.length s >= 8) && (Str.sub s 0 8 =$= "comment-") ->
let lgth = Str.length s in
let opt = (Str.sub s 8 (lgth - 8)) in
(`comment opt)
| "bibtex" -> `bibtex
| "note" -> `note
| "abstract" -> `abstract
| "doi" -> `doi
| "citation" -> `citation
| "tags" -> `tags
| "keywords" -> `keywords
| s -> failwith ("field name unrecognizable: " ^ s)