这是indexloc提供的服务,不要输入任何密码

odenet_wordnet_de 1.0.0 copy "odenet_wordnet_de: ^1.0.0" to clipboard
odenet_wordnet_de: ^1.0.0 copied to clipboard

PlatformLinux

Library and simple CLI app for Open German WordNet.

Open German WordNet (Dart) #

Dart library and simple CLI app for Open German WordNet.

Uses deWordNet.xml from hdaSprachtechnologie/odenet in the WordNet XML schema.

The file is cached using xdg_directories thus only works on Linux.

Usage #

To use the wordnet.dart library:

import 'package:odenet_wordnet_de/odenet_wordnet_de.dart';

void main() async {
  await updateCachedDeWordNet();
  final resource = await loadDeWordNetLexicalResource();
  print('Number of lexical entries: ${resource.lexicalEntries.length}');

  // Accessing lexical entries and synsets
  print('Lexical entries: ${resource.lexicalEntries.length}');
  print('Synsets: ${resource.synsets.length}');

  // Finding lexical entries by part of speech
  final nouns = resource.findLexicalEntries(PartOfSpeech.n);
  print('Number of nouns: ${nouns.length}');

  // Extract the lemma string (word)
  final firstLemma = resource.lexicalEntries.map(toLemmaWrittenForm).first;
}

LexicalResource methods #

  • lexicalEntries: Returns an Iterable<XmlElement> of all lexical entries.
  • synsets: Returns an Iterable<XmlElement> of all synsets.
  • findLexicalEntries(PartOfSpeech partOfSpeech): Returns an Iterable<XmlElement> of lexical entries filtered by part of speech.

License #

The Open German WordNet is openly licensed under the Creative Commons Attribution-ShareAlike 4.0 International License.

Citation #

The canonical citation(s) are in citation.bib, in bibtex format. Please cite them when you write a paper that uses (or refers to) OdeNet.

0
likes
130
points
29
downloads

Publisher

verified publisheryuwash.eu

Weekly Downloads

Library and simple CLI app for Open German WordNet.

Repository (GitHub)

Topics

#language

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

args, http, path, xdg_directories, xml

More

Packages that depend on odenet_wordnet_de