-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
157 additions
and
156 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,177 +1,178 @@ | ||
import pluralize from 'pluralize'; | ||
|
||
export const numberWords = [ | ||
['½', 0.5], | ||
['⅓', 1 / 3], | ||
['⅔', 2 / 3], | ||
['¼', 1 / 4], | ||
['¾', 3 / 4], | ||
['⅕', 1 / 5], | ||
['⅖', 2 / 5], | ||
['⅗', 3 / 5], | ||
['⅘', 4 / 5], | ||
['⅙', 1 / 6], | ||
['⅚', 5 / 6], | ||
['⅐', 1 / 7], | ||
['⅛', 1 / 8], | ||
['⅜', 3 / 8], | ||
['⅝', 5 / 8], | ||
['⅞', 7 / 8], | ||
['⅑', 1 / 9], | ||
['⅒', 1 / 10], | ||
['eleven', 11], | ||
['twelve', 12], | ||
['thirteen', 13], | ||
['fourteen', 14], | ||
['fifteen', 15], | ||
['sixteen', 16], | ||
['seventeen', 17], | ||
['eighteen', 18], | ||
['nineteen', 19], | ||
['twenty', 20], | ||
['thirty', 30], | ||
['forty', 40], | ||
['fifty', 50], | ||
['sixty', 60], | ||
['seventy', 70], | ||
['eighty', 80], | ||
['ninety', 90], | ||
['hundred', 100], | ||
['dozen', 12], | ||
['a dozen', 12], | ||
["baker's dozen", 13], | ||
["a baker's dozen", 13], | ||
['half', 0.5], | ||
['quarter', 0.25], | ||
['third', 1 / 3], | ||
['fourth', 1 / 4], | ||
['fifth', 1 / 5], | ||
['sixth', 1 / 6], | ||
['seventh', 1 / 7], | ||
['eighth', 1 / 8], | ||
['ninth', 1 / 9], | ||
['tenth', 1 / 10], | ||
['twelfth', 12], | ||
['zero', 0], | ||
['one', 1], | ||
['two', 2], | ||
['three', 3], | ||
['four', 4], | ||
['five', 5], | ||
['six', 6], | ||
['seven', 7], | ||
['eight', 8], | ||
['nine', 9], | ||
['ten', 10], | ||
['½', 0.5], | ||
['⅓', 1 / 3], | ||
['⅔', 2 / 3], | ||
['¼', 1 / 4], | ||
['¾', 3 / 4], | ||
['⅕', 1 / 5], | ||
['⅖', 2 / 5], | ||
['⅗', 3 / 5], | ||
['⅘', 4 / 5], | ||
['⅙', 1 / 6], | ||
['⅚', 5 / 6], | ||
['⅐', 1 / 7], | ||
['⅛', 1 / 8], | ||
['⅜', 3 / 8], | ||
['⅝', 5 / 8], | ||
['⅞', 7 / 8], | ||
['⅑', 1 / 9], | ||
['⅒', 1 / 10], | ||
['eleven', 11], | ||
['twelve', 12], | ||
['thirteen', 13], | ||
['fourteen', 14], | ||
['fifteen', 15], | ||
['sixteen', 16], | ||
['seventeen', 17], | ||
['eighteen', 18], | ||
['nineteen', 19], | ||
['twenty', 20], | ||
['thirty', 30], | ||
['forty', 40], | ||
['fifty', 50], | ||
['sixty', 60], | ||
['seventy', 70], | ||
['eighty', 80], | ||
['ninety', 90], | ||
['hundred', 100], | ||
['dozen', 12], | ||
['a dozen', 12], | ||
["baker's dozen", 13], | ||
["a baker's dozen", 13], | ||
['half', 0.5], | ||
['quarter', 0.25], | ||
['third', 1 / 3], | ||
['fourth', 1 / 4], | ||
['fifth', 1 / 5], | ||
['sixth', 1 / 6], | ||
['seventh', 1 / 7], | ||
['eighth', 1 / 8], | ||
['ninth', 1 / 9], | ||
['tenth', 1 / 10], | ||
['twelfth', 12], | ||
['zero', 0], | ||
['one', 1], | ||
['two', 2], | ||
['three', 3], | ||
['four', 4], | ||
['five', 5], | ||
['six', 6], | ||
['seven', 7], | ||
['eight', 8], | ||
['nine', 9], | ||
['ten', 10], | ||
] as const; | ||
|
||
export const knownUnitSingulars = [ | ||
'cup', | ||
'ounce', | ||
'pound', | ||
'quart', | ||
'tablespoon', | ||
'teaspoon', | ||
'pint', | ||
'gallon', | ||
'liter', | ||
'litre', | ||
'milliliter', | ||
'millilitre', | ||
'gram', | ||
'kilogram', | ||
'milligram', | ||
// non-measurement units | ||
'can', | ||
'clove', | ||
'slice', | ||
'package', | ||
'stalk', | ||
'stick', | ||
'box', | ||
'jar', | ||
'container', | ||
'bag', | ||
'bottle', | ||
'bunch', | ||
'bundle', | ||
'pack', | ||
'pinch', | ||
'dash', | ||
'splash', | ||
'bushel', | ||
'handful', | ||
'loaf', | ||
'head', | ||
'carton', | ||
'tin', | ||
'sprig', | ||
'ear', | ||
'cob', | ||
'cup', | ||
'ounce', | ||
'pound', | ||
'quart', | ||
'tablespoon', | ||
'teaspoon', | ||
'pint', | ||
'gallon', | ||
'liter', | ||
'litre', | ||
'milliliter', | ||
'millilitre', | ||
'gram', | ||
'kilogram', | ||
'milligram', | ||
// non-measurement units | ||
'can', | ||
'clove', | ||
'slice', | ||
'package', | ||
'stalk', | ||
'stick', | ||
'box', | ||
'jar', | ||
'container', | ||
'bag', | ||
'bottle', | ||
'bunch', | ||
'bundle', | ||
'pack', | ||
'pinch', | ||
'dash', | ||
'splash', | ||
'bushel', | ||
'handful', | ||
'loaf', | ||
'head', | ||
'carton', | ||
'tin', | ||
'sprig', | ||
'ear', | ||
'cob', | ||
'batch', | ||
]; | ||
export const knownUnitPlurals = knownUnitSingulars.map((w) => pluralize(w)); | ||
|
||
export const articles = ['a', 'an', 'the', 'some']; | ||
|
||
export const unitAbbreviations = [ | ||
['c', 'cup'], | ||
['oz', 'ounce'], | ||
['lb', 'pound'], | ||
['qt', 'quart'], | ||
['tbsp', 'tablespoon'], | ||
['tsp', 'teaspoon'], | ||
['pt', 'pint'], | ||
['gal', 'gallon'], | ||
['l', 'liter'], | ||
['ml', 'milliliter'], | ||
['g', 'gram'], | ||
['kg', 'kilogram'], | ||
['mg', 'milligram'], | ||
['t', 'teaspoon'], | ||
['tb', 'tablespoon'], | ||
['T', 'tablespoon'], | ||
['c', 'cup'], | ||
['oz', 'ounce'], | ||
['lb', 'pound'], | ||
['qt', 'quart'], | ||
['tbsp', 'tablespoon'], | ||
['tsp', 'teaspoon'], | ||
['pt', 'pint'], | ||
['gal', 'gallon'], | ||
['l', 'liter'], | ||
['ml', 'milliliter'], | ||
['g', 'gram'], | ||
['kg', 'kilogram'], | ||
['mg', 'milligram'], | ||
['t', 'teaspoon'], | ||
['tb', 'tablespoon'], | ||
['T', 'tablespoon'], | ||
]; | ||
export const unitAbbreviationPlurals = unitAbbreviations.map(([a, s]) => [ | ||
pluralize(a), | ||
s, | ||
pluralize(a), | ||
s, | ||
]); | ||
|
||
export const knownComments = [ | ||
'to taste', | ||
'divided', | ||
'fresh', | ||
'plus more for serving', | ||
'to taste', | ||
'divided', | ||
'fresh', | ||
'plus more for serving', | ||
]; | ||
|
||
export const adjectives = [ | ||
'boneless', | ||
'skinless', | ||
'fresh', | ||
'deveined', | ||
'peeled', | ||
'chopped', | ||
'crushed', | ||
'grated', | ||
'minced', | ||
'ground', | ||
'cooked', | ||
'chilled', | ||
'frozen', | ||
'roasted', | ||
'boiled', | ||
'canned', | ||
'halved', | ||
'sliced', | ||
'quartered', | ||
'cubed', | ||
'crumbled', | ||
'packed', | ||
'firmly packed', | ||
'lightly packed', | ||
'loosely packed', | ||
'julienned', | ||
'zested', | ||
'juiced', | ||
'pitted', | ||
'cored', | ||
'boneless', | ||
'skinless', | ||
'fresh', | ||
'deveined', | ||
'peeled', | ||
'chopped', | ||
'crushed', | ||
'grated', | ||
'minced', | ||
'ground', | ||
'cooked', | ||
'chilled', | ||
'frozen', | ||
'roasted', | ||
'boiled', | ||
'canned', | ||
'halved', | ||
'sliced', | ||
'quartered', | ||
'cubed', | ||
'crumbled', | ||
'packed', | ||
'firmly packed', | ||
'lightly packed', | ||
'loosely packed', | ||
'julienned', | ||
'zested', | ||
'juiced', | ||
'pitted', | ||
'cored', | ||
]; |