punkish / bomfim

extract tags from xml files
Creative Commons Zero v1.0 Universal
1 stars 1 forks source link

created program that reports on attr type variance #1

Closed mguidoti closed 5 years ago

mguidoti commented 5 years ago

Hi Puneet,

This commit has my attr.js program that creates a report on all values for the attribute "type" in the two tags that Zenodeo currently search this attr., "subSubSection" and "mods:name". It saves it in a *.txt separated by tabs. Here's an example on how it looks like:

tag+attr="type" frequency
<mods:name type="personal"> 4750
<subSubSection type="additional limnonectes">   1
<subSubSection type="additional material examined"> 1
<subSubSection type="affinities">   1
<subSubSection type="associations"> 1
<subSubSection type="basionym"> 2

I don't know how you'll incorporate this into the index.js, but perhaps we could make a function out of this that takes an *.xml as argument, or a cheerio object. Then you could simply call it within your iteration (of the +290k treatments).

If you want me to make these modifications (to create a function), just let me know.