| Crates.io | mzcv |
| lib.rs | mzcv |
| version | 0.2.0 |
| created_at | 2025-11-12 15:42:48.867048+00 |
| updated_at | 2025-12-03 14:21:27.419815+00 |
| description | Handle controlled vocanulaires (CVs) and ontologies, both statically and dynamically |
| homepage | |
| repository | https://github.com/rusteomics/mzcore |
| max_upload_size | |
| id | 1929551 |
| size | 192,710 |
Handle ontologies/controlled vocabularies with getting data from many sources:
http) [CVIndex::update_from_url]CVIndex::update_from_path]CVIndex::update]CVSource::static_data]When downloading a file it downloads it to the standardised location and compresses it with gzip compression to not take up too much space. When opening a file (such as a downloaded file) it first parses the file. If it succeeds it places the file at the standardised location and stores the parsed data in the binary cache. If it fails to parse the file it will report the errors both to the caller of the method and leave the errors next to the standard file location for end user convenience.
There are three major ways of looking up data: index, name, and fuzzy match search. The first two use HashMaps to do constant time lookups, the second uses a trigram index (when search-index is turned on, or loops over all data if not) and loops over all matches using Levenshtein distance to find good enough matches.
http allow downloading ontologies from the internetserde allow using serde (de)serialise to store data in the cachesearch-index builds a trigram index to speed up fuzzy matching