Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
hayribakici committed Jun 15, 2023
1 parent 818e431 commit 58290a0
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
7 changes: 3 additions & 4 deletions lib/openthesaurus.dart
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import 'package:openthesaurus/openthesaurus.dart';

part 'src/openthesaurus_api.dart';


class OpenThesaurus {
/// Creates an instance of this class for requesting synonyms.
factory OpenThesaurus.create() => OpenThesaurus(OpenThesaurusApi());
Expand All @@ -32,7 +31,7 @@ class OpenThesaurus {

/// Retrieve a collection of synonyms based on the given [query] and
/// with the following options. Retrieve ...
///
///
/// * [similar] terms
/// * terms that [startsWith] the same letters as the [query]
/// * [superSet] terms, that are more generic
Expand All @@ -57,13 +56,13 @@ class OpenThesaurus {

/// Retrieve a collection of synonyms based on the given [query] and
/// with the following options. Retrieve ...
///
///
/// * [similar] terms
/// * terms that [startsWith] the same letters as the [query]
/// * [superSet] terms, that are more generic
/// * [subSet] terms, that are more specific
/// * the [baseForm] of the [query]
/// * terms that contain the substring of the [query], starting [from]
/// * terms that contain the substring of the [query], starting [from]
/// a position until the [max].
Future<OpenThesaurusResponse> getWithSubString(String query,
{bool similar = false,
Expand Down
7 changes: 5 additions & 2 deletions lib/src/models/term.dart
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class SimilarTerm extends Term {
_$SimilarTermFromJson(json);
SimilarTerm();

/// Distance to the queried word
/// Distance to the queried word
/// (`0` meaning very close and `>=3` meaning not close.)
int? distance;
}
Expand All @@ -32,7 +32,7 @@ class SynonymTerm extends Term {

SynonymTerm();

/// Level of term usage. Can be [Level.colloquial],
/// Level of term usage. Can be [Level.colloquial],
/// [Level.exalted], [Level.rough] or a [Level.technical] term.
@JsonKey(fromJson: _levelFromJson)
Level? level;
Expand All @@ -42,10 +42,13 @@ class SynonymTerm extends Term {
enum Level {
/// A colloquial term
colloquial(key: 'umgangssprachlich'),

/// A technical term
technical(key: 'fachsprachlich'),

/// A rough term
rough(key: 'derb'),

/// An exalted term
exalted(key: 'gehoben');

Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: openthesaurus
description: A small dart library for querying synonyms from openthesaurus.de
version: 0.0.1
version: 0.0.2
repository: https://github.com/hayribakici/openthesaurus-dart

environment:
Expand Down

0 comments on commit 58290a0

Please sign in to comment.