긴장, 분위기 및 대명사로 스페인 동사를 활용하는 함수 컨쥬 게이트를 포함하는 클래스 컨쥬 게이터.
pip install spanishconjugator
예제 파이썬 사용; Conjugator 클래스의 conjugate 함수는 각각 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 Spanish Conjugator 개발을 돕고 싶다면 다음 코드를 따르십시오.
명령 줄에있는 동안 작업하고 싶은 폴더를 만듭니다 (이름 만 권장)
$ 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
단위 테스트 예를 들어 Pytest 및 기타 라이브러리 도구에 대한 개발자 종속성 설치
pip install -e .[dev]
우리는이 시점에서 단위 테스트에 라이브러리 pytest를 사용하기로 선택했습니다. 개발 안내서에서 코드 작업을 확인하여 /tests 폴더에있는 현재 단위 테스트를 통해 코드 작업을 확인할 수 있습니다.
$ pytest
출력은 구현 된 다른 시제가 아래와 같이 단위 테스트를 통과해야한다는 것을 보여 주어야합니다. (27/08/2020) 
이 저장소에 코드를 제출하려면 포크를 제출하고 풀 요청을 제출하십시오.
노드 또는 브라우저 Enviroment에서 작업중인 경우 라이브러리의 JavaScript NPM 버전을 확인하십시오.
https://github.com/benedict-carling/spanish-conjugatorjs