緊張、気分、代名詞によってスペイン語の動詞を共役する関数コンジュゲートを含むクラスのコンジュゲーター。
pip install spanishconjugator
Python使用の例。 Conjugatorクラスのconjugate関数は、それぞれ根verb、緊張、気分、代名詞である4つのパラメーターを採用します
from spanishconjugator import Conjugator
imperfect_conjugation = Conjugator (). conjugate ( 'hablar' , 'imperfect' , 'indicative' , 'yo' )
print ( imperfect_conjugation )
> >> hablaba すべての代名詞がyo, tu, usted, nosotros, vosotros, ustedes実装されています
現在実装されているすべてのムードはindicative, conditional
現在実装されているすべての時制はpresent, imperfect, preterite, future, present_perfect, past_anterior, future_perfect, conditional_simple
HablarとYoによるさまざまなムード/時制の外観の使用
Conjugator (). conjugate ( 'hablar' , 'present' , 'indicative' , 'yo' )
> >> hablo存在することを示す場合、4番目のParam代名詞はオプションです。
from spanishconjugator import Conjugator
present_indicative_conjugation = Conjugator (). conjugate ( 'hablar' , 'present' , 'indicative' )
print ( present_indicative_conjugation )
> >> { 'el/ella/usted' : 'habla' , 'ellos/ellas/ustedes' : 'hablan' , 'tu' : 'hablas' , 'vosotros' : 'habláis' , 'yo' : 'hablo' , 'nosotros' : 'hablamos' } Conjugator (). conjugate ( 'hablar' , 'imperfect' , 'indicative' , 'yo' )
> >> hablaba Conjugator (). conjugate ( 'hablar' , 'preterite' , 'indicative' , 'yo' )
> >> hablé Conjugator (). conjugate ( 'hablar' , 'future' , 'indicative' , 'yo' )
> >> hablaré Conjugator (). conjugate ( 'hablar' , 'present_perfect' , 'indicative' , 'yo' )
> >> he hablado Conjugator (). conjugate ( 'hablar' , 'past_anterior' , 'indicative' , 'yo' )
> >> hube hablado Conjugator (). conjugate ( 'hablar' , 'future_perfect' , 'indicative' , 'yo' )
> >> habré hablado Conjugator (). conjugate ( 'hablar' , 'simple_conditional' , 'conditional' , 'yo' )
> >> hablaría Conjugator (). conjugate ( 'hablar' , 'perfect' , 'conditional' , 'yo' )
> >> habría hablado Conjugator (). conjugate ( 'hablar' , 'affirmative' , 'imperative' , 'tu' )
> >> habla Conjugator (). conjugate ( 'hablar' , 'negative' , 'imperative' , 'tu' )
> >> hables Conjugator (). conjugate ( 'hablar' , 'present' , 'subjunctive' , 'yo' )
> >> hable Conjugator (). conjugate ( 'hablar' , 'imperfect' , 'subjunctive' , 'yo' )
> >> hablara Conjugator (). conjugate ( 'hablar' , 'imperfect_se' , 'subjunctive' , 'yo' )
> >> hablase Conjugator (). conjugate ( 'hablar' , 'future' , 'subjunctive' , 'yo' )
> >> hablare SpanishConjugatorの開発を支援したい場合は、後続のコードをフォローしてください
コマンドラインで作業を希望するフォルダーを作成している間(名前のみが再に関する)
$ mkdir spanish_conjugator_enviroment
ディレクトリを作成したばかりの環境に変更します
$ cd spanish_conjugator_enviroment
virtualenvをインストールします
$ pip install virtualenv
Python3のパスから仮想環境を作成します
$ virtualenv -p $(which python3) my_venv
仮想環境をアクティブにします
$ source my_venv/bin/activate
ヒント:仮想環境を無効にしたい場合は、
$ deactivateしてください
クローンスペイン語の結合者
$ git clone https://github.com/Benedict-Carling/spanish-conjugator.git
ユニットテストなど、開発者依存関係をインストールします。
pip install -e .[dev]
開発中のガイドのこの時点で、ライブラリPytestを使用してユニットテストに使用することを選択しました/tests
$ pytest
出力は、実装されたさまざまな時制が以下のように単位テストに合格することを示す必要があります。(27/08/2020)
このリポジトリにコードを送信するには、フォークしてプルリクエストを送信してください
ノードまたはブラウザ環境で作業している場合は、ライブラリのJavaScriptNPMバージョンをご覧ください
https://github.com/benedict-carling/spanish conjugatorjs