randClothing
사람이 입는 것과 그 옷감입니다.
theme을 'clothing'WordTheme.clothing"clothing"로 고정한 randWord입니다. 나머지 옵션은 모두 같고, 뜻하는 바도 같습니다.
javascript
import { randClothing } from 'randino';
randClothing({ language: 'en', count: 3 }); // ['Cardigan', 'Mitten', 'Overcoat']
randClothing({ language: 'en', output: 'detail' });
// [{ word: 'Cardigan', language: 'en', theme: 'clothing' }]dart
import 'package:randino/randino.dart';
randClothing(language: WordLanguage.en, count: 3); // [Cardigan, Mitten, Overcoat]List<String>을 돌려줍니다. 상세 출력이 필요하면 randWordDetails에 WordTheme.clothing을 넘기세요. Dart에는 오버로드가 없어서, 이것만을 위해 함수를 스물아홉 개 더 두는 것은 과합니다.
python
from randino import rand_clothing
rand_clothing(language="en", count=3) # ['Cardigan', 'Mitten', 'Overcoat']
rand_clothing(language="en", output="detail")
# [WordDetail(word='Cardigan', language='en', theme='clothing')]옵션
| 옵션 | 타입 | 기본값 | 설명 |
|---|---|---|---|
language | WordLanguageOptionWordLanguage?WordLanguageOption | 'all'null"all" | 생성할 단어의 언어. 생략하면 언어마다 하나씩 골라 모두 섞습니다. |
count | numberintint | 1 | 돌려줄 단어 개수. 0 … 10000으로 제한됩니다. |
realism | RandRealismRandRealismRandRealism | 'real'RandRealism.real"real" | real은 풀에서 단어를 뽑고, invented는 그 언어처럼 읽히기만 하는 단어를 만들어냅니다. mixed는 단어마다 정합니다. |
vocabulary | RandVocabularyRandVocabularyRandVocabulary | 'full'RandVocabulary.full"full" | basic은 누구나 매일 쓰는 단어만, common은 거기에 어른이 이따금 쓰는 단어까지, full은 풀에 있는 모든 단어를 씁니다. |
minLengthminLengthmin_length | numberint?int | None | 단어 풀 | 최소 글자 수. 생략하면 단어 풀이 담고 있는 범위를 따릅니다. |
maxLengthmaxLengthmax_length | numberint?int | None | 단어 풀 | 최대 글자 수. 풀이 만족시킬 수 없으면 가장 가까운 단어로 답합니다. |
startsWithstartsWithstarts_with | stringString?str | —null"" | 이 글자로 시작하는 단어만 남깁니다. |
unique | booleanboolbool | falsefalseFalse | 같은 단어를 두 번 돌려주지 않습니다. 풀이 바닥나면 요청보다 적게 돌아옵니다. |
random | () => numberRandom?Callable[[], float] | None | —nullNone | 무작위성을 어디서 가져올지. 기본값은 각 언어의 일반 난수 생성기입니다. |
output | RandOutputRandOutput | 'value'"value" | 문자열, 또는 단어마다 WordDetail 하나. |