english_words 3.1.5

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

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.5

  • Remove optional new and const

3.1.4

  • Bug fix: Remove duplicates from all

3.1.3

  • Update dependency of pkg:test to 1.0

3.1.1

  • Allow Dart 2

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);
}

Use this package as a library

1. Depend on it

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


dependencies:
  english_words: ^3.1.5

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 flutter 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.5 Nov 21, 2018 Go to the documentation of english_words 3.1.5 Download english_words 3.1.5 archive
3.1.4 Oct 11, 2018 Go to the documentation of english_words 3.1.4 Download english_words 3.1.4 archive
3.1.3 Jul 26, 2018 Go to the documentation of english_words 3.1.3 Download english_words 3.1.3 archive
3.1.2 Jul 23, 2018 Go to the documentation of english_words 3.1.2 Download english_words 3.1.2 archive
3.1.1 Jul 23, 2018 Go to the documentation of english_words 3.1.1 Download english_words 3.1.1 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

All 17 versions...

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

We analyzed this package on Nov 21, 2018, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.0.0
  • pana: 0.12.6

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 <3.0.0
string_scanner ^1.0.1 1.0.4
Transitive dependencies
charcode 1.1.2
meta 1.1.6
path 1.6.2
source_span 1.4.1
Dev dependencies
benchmark_harness ^1.0.4
test ^1.0.0