Skip to main content

Merge and lookup acronyms from a directory tree of definitions.

Project description

FOAL

FOAL (From Official Acronyms Lookup) is a tool to lookup acronyms from a set of YAML files.

Given multiple YAML files that define acronyms and abbreviations, merge the dictionaries in a contextually-sensitive order and lookup acronyms.

What

Define acronyms and abbreviations in context-aware files, then merge and lookup definitions with the ability to prioritize the context.

For example, given these files:

# technology.yaml

acronyms:
    cpu:
        shortform: CPU
        longform: Central Processing Unit

    eps:
        shortform: EPS
        longform: Encapsulated Postscript
# finance.yaml

acronyms:
    cogs:
        shortform: COGS
        longform: Cost of Goods Sold

    cpu:
        shortform: CPU
        longform: Cost per Unit

    eps:
        shortform: EPS
        longform: Earnings per Share

Get a dictionary that prefers the technology context:

$ foal -p technology.yaml
[WARNING] prefer context: ['technology.yaml']
---
acronyms:
    cogs:
        shortform: COGS
        longform: Cost of Goods Sold
        source: finance.yaml
    cpu:
        shortform: CPU
        longform: Central Processing Unit
        source: technology.yaml
    eps:
        shortform: EPS
        longform: Encapsulated Postscript
        source: technology.yaml

Get a dictionary that prefers the finance context:

$ foal -p finance.yaml
[WARNING] prefer context: ['finance.yaml']
---
acronyms:
    cogs:
        shortform: COGS
        longform: Cost of Goods Sold
        source: finance.yaml
    cpu:
        shortform: CPU
        longform: Cost per Unit
        source: finance.yaml
    eps:
        shortform: EPS
        longform: Earnings per Share
        source: finance.yaml

Lookup specific acronyms that prefer the finance context:

$ foal -p technology.yaml -a cpu
[WARNING] prefer context: ['technology.yaml']
---
acronyms:
    cpu:
        shortform: CPU
        longform: Cost per Unit
        source: technology.yaml

Why

It is sometimes necessary to lookup acronyms from a canonical list to use in documentation. The acronyms (or abbreviations) can then be used in automated documentation tools via something like pandoc-acronyms.

Acronyms form a vocabulary that people use within their own frame of reference. The general acceptance of acronyms dependends on multiple factors, such as political landscape, technical expertise, regional differences, context, and native tongue.

For example, most people around the world recognize the United States of America as the USA, the United Kingdom as the UK, and Germany as the BRD (Bundesrepublik Deutschland). English speakers are more likely to recognize BRD when it is used in the context of Olympic competition or an international news broadcast than when BRD appears randomly in a document.

Take another example, CPU.

  • People in Information Technology (IT) immediately think of Central Processing Unit.

  • People in finance are likely to think of Cost per Unit, especially when CPU is used in a financial context.

Taken out of context, abbreviations are difficult to interpret and can lead to misunderstanding in important documents.

About the data structure

  • global.yaml within a directory tree is authoritative.
    Acronyms and abbreviations within global.yaml override acronyms from other files. This is a global context reserved for acronyms that should have universal meaning across an organization. Names of products, BUs, and teams are all good choices for global.yaml.

  • This format does not dictate the hierarchy of acronyms from other files in the git repo. Only global.yaml has special priority. Tool developers and authors may choose to incorporate the other files in whatever priority makes sense in a given context.

  • The definition of "context" for files within a directory tree is left up to individual contributors (other than global.yaml). Be inclusive. TimTowtdi.

A formal Kwalify schema for the format is in schema/acronyms.yaml.

Development

Run:

sdlc/bootstrap
sdlc/build
sdlc/test

Please see CONTRIBUTING.md and TESTING.md.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

foal-0.0.1.tar.gz (10.1 kB view details)

Uploaded Source

Built Distribution

foal-0.0.1-py3-none-any.whl (13.9 kB view details)

Uploaded Python 3

File details

Details for the file foal-0.0.1.tar.gz.

File metadata

  • Download URL: foal-0.0.1.tar.gz
  • Upload date:
  • Size: 10.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.2

File hashes

Hashes for foal-0.0.1.tar.gz
Algorithm Hash digest
SHA256 dee62597ec0575f841e403bb4346d3879d46a6b704792a7fa08c853219287ec5
MD5 589aa1f38cc3f88ffaa19cb7eed3529e
BLAKE2b-256 ce6f30fa94b8cb5945655f48053c42e4a9176aa7e6e52ee8bb35b9f47c6893d9

See more details on using hashes here.

File details

Details for the file foal-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: foal-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 13.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.2

File hashes

Hashes for foal-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 2e14115d5f3aa6c6c0233e3af218f05219fbb04512ded39f193ab426daa06a19
MD5 be615cc83f7bc64d4d86f6360cb38ee2
BLAKE2b-256 6a0b7d48ff6c08a1ad3362db0ac38c8f6cc13d243810ba19be0025c7fd8d9a79

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page