คอนจูเกตเตอร์คลาสที่มีฟังก์ชั่นคอนจูเกตซึ่งผันคำกริยาภาษาสเปนโดยตึงเครียดอารมณ์และคำสรรพนาม
pip install spanishconjugator
ตัวอย่างการใช้ Python; ฟังก์ชั่น conjugate ของคลาส Conjugator ใช้พารามิเตอร์ 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 เป็นตัวเลือก
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
สร้างสภาพแวดล้อมเสมือนจริงจาก Path of Python3
$ virtualenv -p $(which python3) my_venv
เปิดใช้งาน Enviroment เสมือนจริง
$ source my_venv/bin/activate
เคล็ดลับ: เมื่อคุณต้องการที่จะเปลี่ยนสภาพแวดล้อมเสมือนจริงของคุณเพียงแค่เรียกใช้
$ deactivate
Clone Spanish-Conjugator
$ git clone https://github.com/Benedict-Carling/spanish-conjugator.git
ติดตั้งการพึ่งพานักพัฒนาซอฟต์แวร์สำหรับการทดสอบหน่วยเช่น pytest และสำหรับเครื่องมือห้องสมุดอื่น ๆ
pip install -e .[dev]
เราเลือกที่จะใช้ Library PyTest สำหรับการทดสอบหน่วยของเรา ณ จุดนี้ในคู่มือการพัฒนาคุณสามารถตรวจสอบรหัสทำงานได้โดยเรียกใช้กับการทดสอบหน่วยปัจจุบันที่อยู่ในโฟลเดอร์ /tests
$ pytest
เอาท์พุทควรแสดงกาลที่แตกต่างกันที่นำไปใช้ควรผ่านการทดสอบหน่วยของพวกเขาตามด้านล่าง (27/08/2020) 
หากต้องการส่งรหัสไปยัง repositry นี้โปรดแยกและส่งคำขอดึง
ตรวจสอบไลบรารีเวอร์ชัน JavaScript NPM หากคุณทำงานในโหนดหรือเบราว์เซอร์สภาพแวดล้อม
https://github.com/benedict-carling/spanish-conjugatorjs