sozluk 2.1.1 copy "sozluk: ^2.1.1" to clipboard
sozluk: ^2.1.1 copied to clipboard

outdated

Sozluk is a community-driven Turkish dictionary powered by Turkish Language Association.

example/main.dart

import 'package:sozluk/sozluk.dart';
import 'dart:convert';

void sozluk() async {
  var sozluk = Sozluk().dictionary;
  var word = "Dalga";
  var meaning = await sozluk.meaning(word);

  var proverb = await sozluk.proverb(word);

  var audio = await sozluk.audioUrl(word);
  print("Meaning: $meaning");
  print("Proverb: $proverb");
  print("Audio: $audio");
}

void main() async {
  var sozluk = Sozluk().zemberek;
  var word = "Dalga";
  var morphemes = "Verb+Fut+Past+A3sg";

  var spelling_check = await sozluk.spellingCheck(word);
  var generate_word = await sozluk.generateWord(word, morphemes);
  var lemmas = await sozluk.lemmas(word);
  var spelling_suggestions = await sozluk.spellingSuggestions(word);

  print("Spelling Check: $spelling_check");
  print("Generate Word: $generate_word");
  print("Lemmas: $lemmas");
  print("Spelling Suggestions: $spelling_suggestions");
}

void zemberekBackend() async {
  var sozluk = Sozluk().zemberek;
  var word = "Dalga";
  var endpoint = 'spelling_check';
  var jsonBody = '{"word": "$word"}';

  var response = await sozluk.zemberekAPI(endpoint, jsonBody);
  var jsonResponse = json.decode(response);
  var result = jsonResponse['is_correct'];
  print("Response: $result");
}
7
likes
0
points
52
downloads

Publisher

verified publishercidqu.net

Weekly Downloads

Sozluk is a community-driven Turkish dictionary powered by Turkish Language Association.

Homepage
Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter, http

More

Packages that depend on sozluk