english_words 3.1.0

  • README.md
  • CHANGELOG.md
  • Example
  • Installing
  • Versions
  • 91

english_words

Build status

A package containing the most ~5000 used English words and some utility functions.

Usage

Printing the top 50 most used nouns in the English language:

import 'package:english_words/english_words.dart';

main() {
  nouns.take(50).forEach(print);
}

Computing number of syllables in a word:

syllables('beautiful');  // 3
syllables('abatement');  // 3
syllables('zoology');  // 4

Generating 5 interesting 2-syllable word combinations:

generateWordPairs().take(5).forEach(print);

Features and bugs

Please file feature requests and bugs at the issue tracker.

3.1.0

  • Allow injecting Random to generateWordPairs()
  • Add WordPair.random() constructor for easier creation of a single word combo

3.0.1

  • Fix bug that made an unsafe word get generated despite ban

3.0.0

  • BREAKING: WordPair constructor is no longer const
  • BREAKING: WordPair will reject words that are null or empty
  • Add .asCamelCase, .asPascalCase, .asLowerCase and .asUpperCase getters to WordPair. These are memoized, so they're faster to access.
  • Add 'sex' to unsafe words
  • Stricter strong mode turned on
  • Lints resolved

2.0.4

  • Make generateWordPairs 10-20x faster for the most common use case (i.e. running the function with all named parameters at default values).

2.0.3

  • Add 'rape' to unsafe words

2.0.2

  • Add 'AIDS' to unsafe words

2.0.1

  • Update README with refactor to generateWordPairs

2.0.0

  • The generateCombo() function has been renamed to generateWordPairs()
  • generateWordPairs() takes a safeOnly named argument. If set to true (default), it will avoid wordpairs like "ballsack" or anything containing "ass", "shit", "fucking", etc.
  • Add benchmark for GenerateWordPair()
  • Add exception for "cruel"

1.1.2

  • Fix exceptions like "poet" and "conscious"

1.1.1

  • Fix words like "dying" and "flying" to be disyllabic

1.1.0

  • Use string_scanner instead of RegExp replace for most syllable counting
  • 400% faster syllable counting

1.0.0

  • Make the syllables() function work on 99+% cases
  • semver guarantee

0.0.1

  • Initial version

example/english_words_example.dart

// Copyright (c) 2017, filiph. All rights reserved. Use of this source code
// is governed by a BSD-style license that can be found in the LICENSE file.

import 'package:english_words/english_words.dart';

void main() {
  generateWordPairs().forEach(print);
}

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  english_words: "^3.1.0"

2. Install it

You can install packages from the command line:

with pub:


$ pub get

with Flutter:


$ flutter packages get

Alternatively, your editor might support pub get or packages get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:english_words/english_words.dart';
        
Version Uploaded Documentation Archive
3.1.0 Feb 15, 2018 Go to the documentation of english_words 3.1.0 Download english_words 3.1.0 archive
3.0.1 Feb 8, 2018 Go to the documentation of english_words 3.0.1 Download english_words 3.0.1 archive
2.0.4 May 17, 2017 Go to the documentation of english_words 2.0.4 Download english_words 2.0.4 archive
2.0.3 May 12, 2017 Go to the documentation of english_words 2.0.3 Download english_words 2.0.3 archive
2.0.2 May 11, 2017 Go to the documentation of english_words 2.0.2 Download english_words 2.0.2 archive
2.0.1 May 11, 2017 Go to the documentation of english_words 2.0.1 Download english_words 2.0.1 archive
2.0.0 Mar 31, 2017 Go to the documentation of english_words 2.0.0 Download english_words 2.0.0 archive
1.1.2 Mar 9, 2017 Go to the documentation of english_words 1.1.2 Download english_words 1.1.2 archive
1.1.1 Mar 9, 2017 Go to the documentation of english_words 1.1.1 Download english_words 1.1.1 archive
1.1.0 Mar 8, 2017 Go to the documentation of english_words 1.1.0 Download english_words 1.1.0 archive

All 12 versions...

Analysis

This feature is new.
We welcome feedback.
More details: scoring.

We analyzed this package, and provided a score, details, and suggestions below.

  • completed on Feb 15, 2018
  • Dart: 2.0.0-dev.20.0
  • pana: 0.10.1

Scores

Popularity:
Describes how popular the package is relative to other packages. [more]
81 / 100
Health:
Code health derived from static analysis. [more]
100 / 100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100 / 100
Overall score:
Weighted score of the above. [more]
91

Platforms

Detected platforms: Flutter, web, other

No platform restriction found in primary library package:english_words/english_words.dart.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.22.0 <2.0.0
string_scanner ^1.0.1 1.0.2
Transitive dependencies
charcode 1.1.1
path 1.5.1
source_span 1.4.0
Dev dependencies
benchmark_harness ^1.0.4
test >=0.12.20 <0.13.0