Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

False positives for 1 syllable #37

Closed
ssteigen opened this issue Apr 7, 2020 · 6 comments
Closed

False positives for 1 syllable #37

ssteigen opened this issue Apr 7, 2020 · 6 comments

Comments

@ssteigen
Copy link

ssteigen commented Apr 7, 2020

Using this with sentencer.js to create a random phrase generator with the option to restrict the number of syllables per word.

import Sentencer from 'sentencer';
import Syllable from 'syllable';

function getWordsWithSyllables(num, words) {
    return words.filter(function(word) {
        return Syllable(word) === num;
    });
};
   
console.log(getWordsWithSyllables(1, Sentencer._adjectives));

Results in the following output:

[
  "aged",
  "ain",
  "air",
  "bar",
  "beauish", // 2 syllables
  "biped", // 2 syllables
  "bluest", // 2 syllables
  "bluish", // 2 syllables
  "bomb",
  "broch",
  "brute",
  "chill",
  "chin",
  "crooked", // 2 syllables
  "cruel",
  "crying", // 2 syllables
  "cursed",
  "cussed",
  "dam",
  "deuced",
  "dun",
  "dying", // 2 syllables
  "freest", // 2 syllables
  "gluey", // 2 syllables
  "grave",
  "here",
  "hyoid", // 2 syllables
  "jasp",
  "jet",
  "laic",
  "learned",
  "liege",
  "louvred",
  "lying", // 2 syllables
  "male",
  "man",
  "measled", // 2 syllables
  "mere",
  "meshed",
  "mis",
  "naif",
  "naive", // 2 syllables
  "pan",
  "par",
  "pass",
  "peaked",
  "prying", // 2 syllables
  "pyoid", // 2 syllables
  "said",
  "saut",
  "shredless", // 2 syllables
  "store",
  "theist", // 2 syllables
  "toey", // 2 syllables
  "treen", // 2 syllables
  "vying", // 2 syllables
  "weest" // 2 syllables
]

English is weird! Admittedly, I had to look up the pronunciation for a number of these.

@wooorm
Copy link
Member

wooorm commented Apr 7, 2020

As a non-native English speaker, English is very weird ;) Those are lovely examples, Thanks for them!

Same as #38 (comment) applies!

@MichaelChambers
Copy link
Contributor

#40 fixes ying$

@MichaelChambers
Copy link
Contributor

#40 now fixes (th|d)eist also

@MichaelChambers
Copy link
Contributor

#40 fixed naive and shredless

@wooorm wooorm closed this as completed in b2479c9 Apr 21, 2020
@MichaelChambers
Copy link
Contributor

@wooorm , some of the list I didn't update, as they weren't common words and/or didn't appear to be part of a many-word-rule. I didn't update any of these. Instead of rules, perhaps these all could go into problematic as one-off exceptions.
"beauish", // 2 syllables "biped", // 2 syllables "bluest", // 2 syllables "bluish", // 2 syllables "crooked", // 2 syllables "freest", // 2 syllables "gluey", // 2 syllables "hyoid", // 2 syllables "measled", // 2 syllables "pyoid", // 2 syllables "toey", // 2 syllables "treen", // 2 syllables "weest" // 2 syllables

@wooorm
Copy link
Member

wooorm commented Apr 23, 2020

If possible, the problematic list should be kept as short as possible. But yup, if there are no patterns in those words, that makes sense!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants