Metatrans :: Base.

MetaTrans :: Base´Â ¸ÞŸ - º¯È¯±â Ç÷¯±×ÀÎÀ» »ý¼ºÇϱâÀ§ÇÑ Ãß»ó ±âº» Ŭ·¡½ºÀÔ´Ï´Ù.
Áö±Ý ´Ù¿î·Îµå

Metatrans :: Base. ¼øÀ§ ¹× ¿ä¾à

±¤°í

  • Rating:
  • ƯÇã:
  • Perl Artistic License
  • °¡°Ý:
  • FREE
  • °Ô½ÃÀÚ À̸§:
  • Jan Pomikalek
  • °Ô½ÃÀÚ À¥»çÀÌÆ®:
  • http://search.cpan.org/~janpom/MetaTrans-1.04/lib/MetaTrans/Base.pm

Metatrans :: Base. ű×


Metatrans :: Base. ¼³¸í

Metatrans :: Base´Â ¸ÞŸ - º¯È¯±â Ç÷¯±×ÀÎÀ» »ý¼ºÇϱâÀ§ÇÑ Ãß»ó ±âº» Ŭ·¡½ºÀÔ´Ï´Ù. MetaTrans :: Base´Â Meta-Translator Plug-ins.Synopsis # ÀÌ´Â ÀÛ¾÷ ¿¹Á¦°¡ ¾Æ´Õ´Ï´Ù. ±×°ÍÀº ´ÜÁö ÀÏ·¯½ºÆ®¸¦ Á¦°øÇÕ´Ï´Ù. # inking oneÀº metatrans :: ultralinguanet ¼Ò½º Äڵ带 ÂüÁ¶ÇϽʽÿÀ. ÆÐÅ°Áö ¸ÞŸ Æ®·£½º :: myplugin; MetaTrans :: Base; VARS QW (@ISA)¸¦ »ç¿ëÇϽʽÿÀ. @isa = qw (MetaTrans :: Base); http :: request¸¦ »ç¿ëÇϽʽÿÀ. URI :: Å»Ãâ; »õ {³» $ class = shift; ³» % ¿É¼Ç = @_; $ ¿É¼Ç {host_server} = "www.some-online-translator.com"(Á¤ÀÇ µÈ $ ¿É¼Ç {host_server} Á¤ÀÇ); ³» $ self = new metatrans :: base (% ¿É¼Ç); $ self = $ self, $ class; # Áö¿øµÇ´Â ¹ø¿ª ¹æÇâ : # Çѱ¹¾î µ¶ÀϾî # Çѱ¹¾î ÇÁ¶û½º¾î # Çѱ¹¾î ½ºÆäÀξî $ self-> set_languages ( 'eng', 'ger', 'fre', 'spa'); $ self-> set_dir_1_to_all ( 'eng'); $ self-> set_dir_all_to_1 ( 'eng'); $ self¸¦ µ¹·ÁÁÝ´Ï´Ù. } sub create_request {my $ self = shift; ³» $ expression = shift; ³» $ src_lang_code = shift; MY $ DEST_LANG_CODE = SHIFT; # ¿ì¸®ÀÇ ¾ð¾î ÄÚµå - ¼­¹ö ¾ð¾î ÄÚµå º¯È¯ Å×À̺í My % table = (ENG => 'ENG', GER => 'deu', fre => 'fra', spa => 'esp); »õ HTTP :: Request ( 'Get', 'http://www.some-online-translator.com/translate.cgi?')¸¦ ¹ÝȯÇϽʽÿÀ. 'expr ='. uri_escape ($ Ç¥Çö½Ä). '' 'src =' . $ table {$ src_lang_code}. ''. ''dst = '. $ table {$ dest_lang_code}); } sub process_response {My $ self = shift; ³» $ ¸ñÂ÷ = º¯È­; # ¿ì¸®´Â ¿©±â¼­ À̰͵鿡 ´ëÇØ »ó°üÇÏÁö ¾Ê½À´Ï´Ù. ±×·¯³ª ¾î¶² °æ¿ì¿¡´Â ¿ì¸®´Â My $ src_lang_code = Shift¸¦ µ¹ºÁ¾ß ÇÒ ¼öµµ ÀÖ½À´Ï´Ù. MY $ DEST_LANG_CODE = SHIFT; ³» @Result; µ¿¾È ($ contents = m | ([^


Metatrans :: Base. °ü·Ã ¼ÒÇÁÆ®¿þ¾î