dictionaryx 0.0.1 copy "dictionaryx: ^0.0.1" to clipboard
dictionaryx: ^0.0.1 copied to clipboard

outdated

English dictionary, based on Wordnet.

example/example.md

// Import only the Dictionary you need!

import 'package:dictionaryx/dictionaryMSA.dart';
import 'package:dictionaryx/dictionaryMSA5000.dart';
import 'package:dictionaryx/dictionarySA.dart';
import 'package:dictionaryx/dictionarySA5000.dart';

// Lookup an entry with synonyms and antonyms, only.
// Use the dictionary containing 5000 entries with the most common words.
// It loads faster than the dictionary with meanings.

print(DictionarySA5000.hasEntry('assafef')); // false
print(DictionarySA5000.hasEntry('meeting')); // true

var entry = DictionarySA5000.getEntry('meeting');
print(entry.word); // meeting
print(entry.synonyms); // [Assemble, Contact, Adjoin, Forgather, See]
print(entry.antonyms); // [diverge]

// Lookup an entry with its meanings.
// Use the dictionary containing 5000 entries.
// Make sure to check the length of explanations
// and meanings when accessing them!

entry = DictionaryMSA5000.getEntry('meeting');
print(entry.word); // meeting
print(entry.synonyms); // [Assemble, Contact, Adjoin, Forgather, See]
print(entry.antonyms); // [diverge]
print(entry.explanations.first.pos); // POS.NOUN
print(entry.explanations.first.description); // a formally arranged gathering
print(entry.explanations.first.meanings.first); // Gathering
print(entry.explanations.first.examples.first); // next year the meeting ...

print(entry.explanations.first.meanings.length); // 2 (check for zero!)
print(entry.explanations.first.examples.length); // 2 (check for zero!)

// In the same manner, the complete dictionary can be accessed.
// Compared to the 5000 dictionary, the complete dictionary has
// a larger memory footprint.

// Smaller memory footprint, with no meanings.
entry = DictionarySA.getEntry('tree');

// Larger memory footprint, with meanings.
entry = DictionaryMSA.getEntry('tree');
13
likes
0
points
61
downloads

Publisher

verified publishernovelplotter.com

Weekly Downloads

English dictionary, based on Wordnet.

Repository (GitHub)
View/report issues

License

unknown (license)

More

Packages that depend on dictionaryx