Skip to main content

Crate academic_journals

Crate academic_journals 

Source
Expand description

§Academic Journals

A Rust library for fast lookups of academic journal abbreviations and full names.

This crate provides a simple API to convert between full journal names and their abbreviations, using data from the JabRef project (abbrv.jabref.org).

§Features

  • Fast O(1) lookups: Uses pre-built HashMaps for instant lookups
  • Large dataset: Thousands of journals from multiple academic disciplines
  • Multiple formats: Supports both dotted and dotless abbreviation styles
  • Zero runtime cost: All data is embedded at compile time
  • Thread-safe: Statics are initialized once via std::sync::LazyLock

§Quick Start

use academic_journals::{get_abbreviation, get_full_name};

// Get abbreviation from full name (dotless feature)
let abbr = get_abbreviation("Critical Care Medicine");
assert_eq!(abbr, Some("Crit Care Med".to_string()));

// Get full name from abbreviation (dotless feature)
let name = get_full_name("Crit Care Med");
assert_eq!(name, Some("Critical Care Medicine".to_string()));

§Feature Flags

  • dotless (default): Use dotless abbreviations (e.g., “Crit Care Med”)
  • dot: Use dotted abbreviations (e.g., “Crit. Care Med.”)
  • online (default): Download latest data at build time

§Data Source

Journal data is provided by the JabRef project and is released under CC0 1.0 Universal (CC0 1.0) Public Domain Dedication.

Functions§

get_abbreviation
Retrieves the first available abbreviation for a given journal’s full name.
get_full_name
Retrieves the full name of a journal given its abbreviation.