•  untoreh-ukukhanya

I-MTR: ukuhumusha okuningi

ukugoqa izinsizakalo zokuhumusha ukuze zisetshenziswe ngaphakathi

Lapho ushicilela iwebhusayithi ungahle ufune ukunikeza ukuhumusha okuhlukile. Abanye abantu abathandi abahumushi abazenzakalelayo, ngicabanga ukuthi ukuhumusha okuzenzakalelayo kuhle ngokwanele, futhi kungcono kunalutho, futhi abahumushi abazisebenzelayo baye bathuthuka kangcono ngokuthuthuka I-NLP futhi I-ML.

Izinsizakalo ezijwayelekile zokuhumusha yi-google, bing, yandex. Lokhu kunikela ngesigaba samahhala esifuna ukusisongela ukusisebenzisa kwethu siqu. Kukhona nokunye okuncane okungaziwa izinsizakalo zokuhumusha , futhi ezinye zazo zivaliwe ngesikhathi sokubhala ...

Umbhalo wokulondoloza isikhashana

Uma sifuna ukulondoloza okwesikhashana ukuhumusha, besidinga ukuhlukanisa umbhalo oceliwe ube yimicu emincane yokuthi mincane ngokwanele ukuhlinzeka ngokushaya kwezicelo ezizayo zesikhathi esizayo. I- ezohwebo ukuthi ukuhunyushwa kwemisho emincane kunomongo omncane, okwehlisa ikhwalithi yokuhumusha.

Ngabe siwuhlukanisa kanjani umbhalo ongenayo ukuze sikwazi ukwakha kabusha okwangempela kusuka kumbhalo ohunyushiwe kuliqhinga impela..noma ukukhohlisa. Sifuna ukuthola intambo exakile ngokwanele ukuthi insiza yokuhumusha iyishiye njengoba kunjalo ekuphumeni kwayo. Ngithole ukuhlukahluka kwe- umlingiswa wendima ukusebenza izikhathi eziningi

$this->misc['glue'] = ' ; ¶ ; ';
$this->misc['splitGlue'] = '/\s?;\s?¶\s?;?\s?/';

I-glue intambo isetshenziselwa ukuvumelana konke izintambo (kwehlukaniswe nesicelo sokuqala) kuya ku- eyodwa umzimba owodwa wesicelo sokuhumusha esikhuphukayo esisithumela isib. i-google. I-splitGlue esikhundleni salokho kusetshenziselwa ukwahlukanisa ukuhumusha okutholakele kwaba yizingcingo esizozenza inqolobane. Sibona lapha ukuthi ukwehlukaniswa kwezintambo akusizi nje ukulondolozwa kwesikhashana, kepha ku- ukunciphisa inani lezicelo, ngoba uma kwenzeka isicelo sethu esezansi senza imibuzo eminingi emincane, sisebenzisa imishini yethu ukuhlanganisa izicelo kuze kufike kusayizi omkhulu wokulayisha okhokhelwayo ovunyelwe insizakalo ephezulu.

Isibonisi

Ukuze usekele izinsizakalo eziningi ngokusobala Ngabhala isikhombimsebenzisi esihlala kule api

function__construct(
    Mtr &$mtr,
    Client &$gz,
    TextReq &$txtrq,
    LanguageCode &$ld);
functiontranslate($source, $target, $input);
functiongenReq(array$params);
functionpreReq(array &$input);
functiongetLangs();

Ngakho-ke insizakalo ezosebenza kufanele inikeze umsebenzi wokuhumusha, ukuthi uhumusha kanjani izicelo, futhi unikeze uhlu lwezilimi ezisekelwayo. Ngohlu lwezilimi ezisekelwayo singakha i-matrix yokuthi sazi ukuthi zingaki izinsizakalo ezisekela ngababili bolimi oluthile, lokwehlukanisa ngababili bolimi siguqula isethulo esibuyiswe yisevisi sifananeiso639-1.

Ukwakhiwa kwesibonelo sokuhumusha futhi kuvumela ukumisa izinketho zezicelo ezisetshenzisweGuzzle isibonelo seklayenti esinokuthi ngokwesibonelo sisebenzise ama-proxies ukwenza izicelo. Izinsizakalo zikhona okulondoloziwe ngemuva kokukhiqizwa okokuqala, lokhu kuyasiza ngoba ezinye izinsizakalo zidinga ukukhiqiza amathokheni okuqala, futhi asifuni ukuzivuselela njalo.

Uhlobo lweGo

Ngibhale ne- inguqulo ku-golang. Uhlobo lwe-PHP luzosetshenziswa ngokulungenisa kuphrojekthi yakho ye-PHP, kanti uhlobo lwe-go lusebenza njengensizakalo ezimele (micro). Uhlobo lwe-go lusenzo kakhulu njengoba ludinga ukubhekwa kohlobo oluqinile futhi njengoba sisekela ukubuza izintambo eziningi ngasikhathi sinye, kufanele siveze i-api esebenza ngezinhlanganisela zokufaka ezahlukahlukene, futhi ukusweleka kwe-go genics kwenza ukwenziwa kube buhlungu kakhulu, kepha kwanikela ukucubungula ngasikhathi sinye, futhi kwakushesha kakhulu ngokujwayelekile.

Okokufaka kokuhlanza

Kuhlanganiswe nokuhumusha ngiphinde ngakha insizakalo eya ku- hlanza i-html . Sigunyaza amanye amathegi we-html bese sikulahla okusele. Sisusa nezimpawu zokubhala eziyimpinda ezifana noogaxekile nezimpawu ezingaziwa ze-html, bese sihlanganisa izixhumanisi zibe amathegi wehange afanele.

Ukuzibamba:

Iziphetho

Kulezi zinsuku ngicabanga ukuthi ngizovele ngisebenzise isisombululo esizimele, esinikezwe ngu-joshua noma u-argos, ngoba angihlosile ukuhumusha okuhle kakhulu, ngifuna ukunikeza ukuhumusha okufundekayo kwewebhusayithi, ukuze ikwazi ukuzulazula ngaphandle kokungqubuzana.

Thumela Amathegi: