Skip to content

Commit

Permalink
add docs for anagram module
Browse files Browse the repository at this point in the history
  • Loading branch information
cheatsnake committed Jul 23, 2022
1 parent f734da5 commit c6f5ec0
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 0 deletions.
26 changes: 26 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ The service is divided into independent modules. Each module starts with a brief
- [Schulte](#schulte)
- [Minesweeper](#minesweeper)
- [Wordsearch](#wordsearch)
- [Anagram](#anagram)

### Sudoku

Expand Down Expand Up @@ -486,6 +487,31 @@ Returned response:
}
```

### Anagram

[Anagrams](https://en.wikipedia.org/wiki/Anagrams_(game)) is a whole type of puzzles associated with composing all possible words from a given set of letters. This module implements the simplest variation of anagrams: a random word is given, the letters of which should be used to compose as many other words as possible.

Only English nouns are used for composition, a list of which can be found in this repository at the path `./data/nouts.txt`.

```rust
GET https://shadify.dev/api/anagram/generator
```

Returned response:

```json
{
"Task":"possibility",
"Words":[
"bit","bolt","boy","lip","list","loss","oil",
"pilot","plot","toy","pot","slip","soil","soy",
"spot","spy","stop","tip","top"
]
}
```

> `Task` - a word from which you need to make other words. <br> `Words` - an array of all possible words that are compiled from `Task`.
## Starting a local server

1. Clone this repository onto your computer:
Expand Down
26 changes: 26 additions & 0 deletions README_RU.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ Shadify – это мощный сервис генерации данных и
- [Schulte](#schulte)
- [Minesweeper](#minesweeper)
- [Wordsearch](#wordsearch)
- [Anagram](#anagram)

### Sudoku

Expand Down Expand Up @@ -483,6 +484,31 @@ GET https://shadify.dev/api/wordsearch/generator
}
```

### Anagram

[Анаграммы](https://en.wikipedia.org/wiki/Anagrams_(game)) – это целый вид головоломок связанный с составлением все возможных слов из заданного набора букв. Данный модуль реализует самую простую вариацию анаграмм: задается случайное слово, из букв которого, необходимо составить как можно больше других слов.

Для составления используются только английские существительные, список которых можно найти в этом репозитории по пути `./data/nouts.txt`.

```rust
GET https://shadify.dev/api/anagram/generator
```

Возвращаемый ответ:

```json
{
"Task":"possibility",
"Words":[
"bit","bolt","boy","lip","list","loss","oil",
"pilot","plot","toy","pot","slip","soil","soy",
"spot","spy","stop","tip","top"
]
}
```

> `Task` - слово из которого необходимо составлять другие слова. <br> `Words` - массив всех возможных слов, которые составляются из `Task`.
## Запуск локального сервера

1. Склонируйте этот репозиторий к себе на компьютер:
Expand Down

0 comments on commit c6f5ec0

Please sign in to comment.