Which words can you spell using only element abbreviations from the periodic table?

Overview

Periodic Words

Have you ever wondered which words you can spell using only element abbreviations from the periodic table?

Well thanks to this extremely important software I have written, you can set that wonder free.

My daughter came home with this handout

Chemistry is FUN

This proves that in fact Chemistry is FUN. So I replied with this. It's important to engage with your child's teacher.

Chemistry is FARTS

The Chemistry building was a major thoroughfare at my university and I was thinking of all the esters labs that ruined my appetite on the way to lunch.

Still curious, I wrote this command line utility.

Usage

Check a single word:

$ periodic-words -w oversaturation
oversaturation "[Oxygen][Vanadium][Erbium][Sulfur][Astatine][Uranium][Radium][Titanium][Oxygen][Nitrogen]"

Or you can provide a word list to check. You probably already have one on your system:

$ periodic-words -f /usr/share/dict/words

Here is another source of word lists in a few languages: https://github.com/lorenbrichter/Words

Now I'm sure you're wondering if any of the names of the elements can themselves be written out using the element abbreviations.

silver "[Sulfur][Iodine][Livermorium][Erbium]"
copper "[Carbon][Oxygen][Phosphorus][Phosphorus][Erbium]"
oganesson "[Oxygen][Gallium][Nitrogen][Einsteinium][Sulfur][Oxygen][Nitrogen]"
silicon "[Sulfur][Iodine][Lithium][Carbon][Oxygen][Nitrogen]"
tin "[Titanium][Nitrogen]"

Carbon and Xenon do it starting with their own element.

carbon "[Carbon][Argon][Boron][Oxygen][Nitrogen]"
xenon "[Xenon][Nitrogen][Oxygen][Nitrogen]"

Phosphorous is the only one that refers to itself twice

phosphorus "[Phosphorus][Hydrogen][Oxygen][Sulfur][Phosphorus][Hydrogen][Oxygen][Ruthenium][Sulfur]"

You can check this yourself using the elements-as-a-word-list.txt file in this repo.

If you're writing a Chemistry textbook, I bet you could find a way to use this for each of your chapter titles

Chemistry is brew "[Boron][Rhenium][Tungsten]"
Chemistry is concoction "[Carbon][Oxygen][Nitrogen][Carbon][Oxygen][Carbon][Titanium][Oxygen][Nitrogen]"
Chemistry is dynamite "[Dysprosium][Nitrogen][Americium][Iodine][Tellurium]"
Chemistry is fractionation "[Fluorine][Radium][Carbon][Titanium][Oxygen][Nitrogen][Astatine][Iodine][Oxygen][Nitrogen]"
Chemistry is gasses "[Gallium][Sulfur][Sulfur][Einsteinium]"
Chemistry is esterases "[Einsteinium][Tellurium][Radium][Sulfur][Einsteinium]"
Chemistry is pressure "[Phosphorus][Rhenium][Sulfur][Sulfur][Uranium][Rhenium]"
Chemistry is salts "[Sulfur][Aluminium][Tennessine]"
Chemistry is the solution "[Sulfur][Oxygen][Lutetium][Titanium][Oxygen][Nitrogen]"
Chemistry is synthesis "[Sulfur][Yttrium][Nitrogen][Thorium][Einsteinium][Iodine][Sulfur]"
Chemistry is oversaturation "[Oxygen][Vanadium][Erbium][Sulfur][Astatine][Uranium][Radium][Titanium][Oxygen][Nitrogen]"
Chemistry is supersaturate "[Sulfur][Uranium][Phosphorus][Erbium][Sulfur][Astatine][Uranium][Radium][Tellurium]"
Chemistry is alkali "[Aluminium][Potassium][Aluminium][Iodine]"
Chemistry is catalytic "[Carbon][Astatine][Aluminium][Yttrium][Titanium][Carbon]"
Chemistry is cationic "[Carbon][Astatine][Iodine][Oxygen][Nitrogen][Iodine][Carbon]"
Chemistry is calculation "[Carbon][Aluminium][Carbon][Uranium][Lanthanum][Titanium][Oxygen][Nitrogen]"
Chemistry is calibration "[Carbon][Aluminium][Iodine][Boron][Radium][Titanium][Oxygen][Nitrogen]"
Chemistry is carcinogenic "[Carbon][Argon][Carbon][Iodine][Nitrogen][Oxygen][Germanium][Nitrogen][Iodine][Carbon]"
Chemistry is catalysis "[Carbon][Astatine][Aluminium][Yttrium][Sulfur][Iodine][Sulfur]"

Installation

Setup rust and cargo (for example using [rustup]https://rustup.rs/)

Clone this repo: git clone https://github.com/jspencer/periodic-words.git && cd periodic-words

Build a release: cargo build --release

License

Licensed under either of

at your option.


Ain't chemistry a [Molybdenum][Thorium][Erbium][Fluorine][Uranium][Carbon][Potassium][Erbium]

You might also like...
A Markdown to HTML compiler and Syntax Highlighter, built using Rust's pulldown-cmark and tree-sitter-highlight crates.

A blazingly fast( possibly the fastest) markdown to html parser and syntax highlighter built using Rust's pulldown-cmark and tree-sitter-highlight crate natively for Node's Foreign Function Interface.

A lightweight platform-accelerated library for biological motif scanning using position weight matrices.

🎼 🧬 lightmotif A lightweight platform-accelerated library for biological motif scanning using position weight matrices. 🗺️ Overview Motif scanning

Implementation of sentence embeddings with BERT in Rust, using the Burn library.
Implementation of sentence embeddings with BERT in Rust, using the Burn library.

Sentence Transformers in Burn This library provides an implementation of the Sentence Transformers framework for computing text representations as vec

What if we could check declarative macros before using them?
What if we could check declarative macros before using them?

expandable An opinionated attribute-macro based macro_rules! expansion checker. Textbook example rustc treats macro definitions as some opaque piece o

OBKV Table Client is Rust Library that can be used to access table data from OceanBase storage layer.

OBKV Table Client is Rust Library that can be used to access table data from OceanBase storage layer. Its access method is different from JDBC, it skips the SQL parsing layer, so it has significant performance advantage.

Easy pretty print your Rust struct into single element or table

Easy pretty print your Rust struct into single element or table

Mirroring remote repositories to s3 storage, with atomic updates and periodic garbage collection.

rsync-sjtug WIP: This project is still under development, and is not ready for production use. rsync-sjtug is an open-source project designed to provi

Source code spell checker

eztd is meant to close the ergonomics gap between Rust and Python.

languagetool-code-comments integrates the LanguageTool API to parse, spell check, and correct the grammar of your code comments!
languagetool-code-comments integrates the LanguageTool API to parse, spell check, and correct the grammar of your code comments!

languagetool-code-comments integrates the LanguageTool API to parse, spell check, and correct the grammar of your code comments! Overview Install MacO

A small CLI utility for helping you learn japanese words made in rust 🦀
A small CLI utility for helping you learn japanese words made in rust 🦀

Memofante (Clique aqui ver em português) Memofante is here, a biiiig help: Do you often forget japanese words you really didn't want to forget? Do you

Probabilistically split concatenated words using NLP based on English Wikipedia unigram frequencies.
Probabilistically split concatenated words using NLP based on English Wikipedia unigram frequencies.

Untanglr Untanglr takes in a some mangled words and makes sense out of them so you dont have to. It goes through the input and splits it probabilistic

C library for finding nearest (most similar) element in a set

VP-tree nearest neighbor search A relatively simple and readable Rust implementation of Vantage Point tree search algorithm. The VP tree algorithm doe

A library for advanced finite element computations in Rust
A library for advanced finite element computations in Rust

A Rust library for building advanced applications with the Finite Element Method (FEM). Although developed with a special emphasis on solid mechanics

Demo Rust / VueJS+element-plus

rust-vue-demo This project demonstrates the integration of npm/vue into a rust axum web-service. The web-service is self-contained, embedding the webu

Like HashSet but retaining INSERTION order and without `Hash` requirement on the Element type.

identified_vec A collection of unique identifiable elements which retains insertion order, inspired by Pointfree's Swift Identified Collections. Simil

A 2D Rust-Based Finite Element Simulator
A 2D Rust-Based Finite Element Simulator

Magnetite A 2D linear-elastic FEA program for isotropic materials, built in Rust. Overview Magnetite is a simple linear-elastic mechanical solver for

Distrod is a meta-distro for WSL 2 which runs Systemd as init process. You can run Ubuntu, Arch, and et.c with systemd in a minute. Distrod also has built-in auto-start feature on Windows startup and port forwarding abiltiy.
Distrod is a meta-distro for WSL 2 which runs Systemd as init process. You can run Ubuntu, Arch, and et.c with systemd in a minute. Distrod also has built-in auto-start feature on Windows startup and port forwarding abiltiy.

Distrod - WSL2 Distros with Systemd! Distrod is a systemd-based meta-distro for WSL2 that allows you to install Ubuntu, Arch Linux, Gentoo and many ot

A CLI tool which can help you automatically kill process of your choice. Useful for freeing up memory and CPU usage!
A CLI tool which can help you automatically kill process of your choice. Useful for freeing up memory and CPU usage!

Quickiller There are always programs such as chrome that keep eating up your resources even when closed! The only way to prevent this is to kill all o

Cogo is a high-performance library for programming stackful coroutines with which you can easily develop and maintain massive concurrent programs.
Cogo is a high-performance library for programming stackful coroutines with which you can easily develop and maintain massive concurrent programs.

Cogo is a high-performance library for programming stackful coroutines with which you can easily develop and maintain massive concurrent programs.

Comments
  • Improve compound generation with dynamic programming

    Improve compound generation with dynamic programming

    Hello, checked out your repo when rustlang retweeted it. Thought it was a cool idea and wanted to help improve it.

    Pros:

    • runs faster with larger inputs O(N) algorithm rather than O(N^2) due to sub-optimal string indexing with line.chars().nth(n)
    • Generates shorter compounds
    • Avoids some allocations at the cost of limiting output to only static string slices

    Cons:

    • Uses more memory (O(N * shortest compound length))
    • because of using dynamic programming, the recurrence relation relies on ascii string indices, limiting the input
    • negligible performance improvement on smaller inputs

    This is the bench mark of running with words_alpha.txt from https://github.com/dwyl/english-words . Both built with cargo build --release

    raze@sol~/P/periodic-words> git branch
      dyn-programming-solution
    * main
    raze@sol~/P/periodic-words> time target/release/periodic-words -f word-lists/words_alpha.txt
    
    ________________________________________________________
    Executed in    1.04 secs    fish           external
       usr time    1.04 secs  475.00 micros    1.04 secs
       sys time    0.01 secs  115.00 micros    0.00 secs
    
    raze@sol~/P/periodic-words> git checkout dyn-programming-solution 
    Switched to branch 'dyn-programming-solution'
    raze@sol~/P/periodic-words> cargo build --release
       Compiling periodic-words v0.1.0 (/home/raze/Projects/periodic-words)
        Finished release [optimized] target(s) in 1.81s
    raze@sol~/P/periodic-words> time target/release/periodic-words -f word-lists/words_alpha.txt
    
    ________________________________________________________
    Executed in  423.49 millis    fish           external
       usr time  421.47 millis  396.00 micros  421.08 millis
       sys time    2.10 millis   98.00 micros    2.00 millis
    
    
    opened by Beepbop0 1
Owner
J Spencer
J Spencer
Probabilistically split concatenated words using NLP based on English Wikipedia unigram frequencies.

Untanglr Untanglr takes in a some mangled words and makes sense out of them so you dont have to. It goes through the input and splits it probabilistic

Andrei Butnaru 15 Nov 23, 2022
Common stop words in a variety of languages

About Stop words are words that don't carry much meaning, and are typically removed as a preprocessing step before text analysis or natural language p

Chris McComb 9 Dec 9, 2022
Predict next words (`・ω・´)

Mocword Predict next words (`・ω・´) Installation Important: You must prepare Mocword dataset in advance. See below (Dataset and Environment Variable).

high-moctane 36 Dec 3, 2022
An opinionated, better system for spelling words in English.

ingLix / ˈɪŋ glɪʃ / English done right. An opinionated, better system for spelling words in English. Preamble Click to expand. The English language is

Nicholas Omer Chiasson 6 Aug 8, 2022
SHA256 sentence: discover a SHA256 checksum that matches a sentence's description of hex digit words.

SHA256 sentence "The SHA256 for this sentence begins with: one, eight, two, a, seven, c and nine." Inspired by @lauriewired post Inspired by @humbleha

Joel Parker Henderson 16 Oct 9, 2023
(Read-only) Generate n-grams

N-grams Documentation This crate takes a sequence of tokens and generates an n-gram for it. For more information about n-grams, check wikipedia: https

Paul Woolcock 26 Dec 30, 2022
🔴〰️🔵〰️⚫ Not Only a Translator

?? Not Only a Translator ?? English·中文 ?? This program is not just a translation software, it is not named yet. Supports conversion of input character

Breaker 12 Dec 5, 2022
A quick way to decode a contract's transaction data with only the contract address and abi.

tx-decoder A quick way to decode a contract's transaction data with only the contract address and abi. E.g, let tx_data = "0xe70dd2fc00000000000000000

DeGatchi 15 Feb 13, 2023
Rust edit distance routines accelerated using SIMD. Supports fast Hamming, Levenshtein, restricted Damerau-Levenshtein, etc. distance calculations and string search.

triple_accel Rust edit distance routines accelerated using SIMD. Supports fast Hamming, Levenshtein, restricted Damerau-Levenshtein, etc. distance cal

Daniel Liu 75 Jan 8, 2023
A crate using DeepSpeech bindings to convert mic audio from speech to text

DS-TRANSCRIBER Need an Offline Speech To Text converter? Records your mic, and returns a String containing what was said. Features Begins transcriptio

null 32 Oct 8, 2022