Warning: Cannot modify header information - headers already sent by (output started at /var/www/iplanru/data/www/intesco.ru/d59ed/index.php(1) : eval()'d code(2) : eval()'d code:102) in /var/www/iplanru/data/www/intesco.ru/d59ed/index.php(1) : eval()'d code(2) : eval()'d code on line 4

Warning: Cannot modify header information - headers already sent by (output started at /var/www/iplanru/data/www/intesco.ru/d59ed/index.php(1) : eval()'d code(2) : eval()'d code:102) in /var/www/iplanru/data/www/intesco.ru/d59ed/index.php(1) : eval()'d code(2) : eval()'d code on line 4

Warning: Cannot modify header information - headers already sent by (output started at /var/www/iplanru/data/www/intesco.ru/d59ed/index.php(1) : eval()'d code(2) : eval()'d code:102) in /var/www/iplanru/data/www/intesco.ru/d59ed/index.php(1) : eval()'d code(2) : eval()'d code on line 4

Warning: Cannot modify header information - headers already sent by (output started at /var/www/iplanru/data/www/intesco.ru/d59ed/index.php(1) : eval()'d code(2) : eval()'d code:102) in /var/www/iplanru/data/www/intesco.ru/d59ed/index.php(1) : eval()'d code(2) : eval()'d code on line 4

Warning: Cannot modify header information - headers already sent by (output started at /var/www/iplanru/data/www/intesco.ru/d59ed/index.php(1) : eval()'d code(2) : eval()'d code:102) in /var/www/iplanru/data/www/intesco.ru/d59ed/index.php(1) : eval()'d code(2) : eval()'d code on line 4

Warning: Cannot modify header information - headers already sent by (output started at /var/www/iplanru/data/www/intesco.ru/d59ed/index.php(1) : eval()'d code(2) : eval()'d code:102) in /var/www/iplanru/data/www/intesco.ru/d59ed/index.php(1) : eval()'d code(2) : eval()'d code on line 4
usr/share/vim/vim72/macros/urm/examples000066600000002104150777022630014060 0ustar00Note that enough temporary registers should be provided for each example. All should be initialised to 0. Initial register values for benchmarking: 0,8,3,0,... Performed on a Xenix 386/16: Operation [sec, kbyte tmp space]: program Asym. Diff.[ 7, 4]: (s2;s3)3. Abs. Diff. [90,81]: (a1;a4;s2)2; (a2;s1)1; (a1;a5;s3)3; (a3;s1)1; (s2;s3)3; (s5;s4)4; (a2;s5)5. Add [ 7, 4]: (a2;s3)3. Mult [227, 161]: (a4;a5;s2)2; ((a2;s4)4; s3; (a1;a4;s5)5; (a5;s1)1)3. Copy [ 48, 25]: (a1;a3;s2)2; (a2;s1)1. sign [ 30, 17]: (a3;s2)2; (a2;(s3)3)3. !sign[ 36, 28]: (a3;s2)2; (a2;(s3)3)3; a3; (s3;s2)2; (s3;a2)3. Div [630,1522]: (a9;s2)2; (a2;a10;s3)3; (a3;s2)2; (a2;(s3)3)3; a3; (s3;s2)2; (s3;a2)3; (a2)2;(a2;s9)9;(a3;s10)10; (a9;a10;s2)2; (a11;a12;s3)3; (a2;s12)12; (a3;s9)9; (s2;s3)3; (a3;s2)2; (a2;(s3)3)3; a3; (s3;s2)2; (s3;a2)3; (a1;s2)2; (a2;s10)10; (a3;s11)11; ((a12;a13;s3)3; (a3;s13)13; (s2;s3)3; (a3;s12)12; a14; (s1)1; (a9;a10;s2)2; (a11;a12;s3)3; (a2;s12)12; (a3;s9)9; (s2;s3)3; (a3;s2)2; (a2;(s3)3)3; a3; (s3;s2)2; (s3;a2)3; (a1;s2)2; (a2;s10)10; (a3;s11)11)1; (s2)2; (a2;s14)14. fstab.example2000066600000003103150777747460007333 0ustar00# /etc/fstab: static file system information. # # The following is an example. Please see fstab(5) for further details. # Please refer to mount(1) for a complete description of mount options. # # Format: # # # dump(8) uses the field to determine which file systems need # to be dumped. fsck(8) uses the column to determine which file # systems need to be checked--the root file system should have a 1 in # this field, other file systems a 2, and any file systems that should # not be checked (such as MS-DOS or NFS file systems) a 0. # # The `sw' option indicates that the swap partition is to be activated # with `swapon -a'. /dev/hda2 none swap sw 0 0 # The `bsdgroups' option indicates that the file system is to be mounted # with BSD semantics (files inherit the group ownership of the directory # in which they live). `ro' can be used to mount a file system read-only. /dev/hda3 / ext2 defaults 0 1 /dev/hda5 /home ext2 defaults 0 2 /dev/hda6 /var ext2 defaults 0 2 /dev/hda7 /usr ext2 defaults,ro 0 2 /dev/hda8 /usr/local ext2 defaults,bsdgroups 0 2 # The `noauto' option indicates that the file system should not be mounted # with `mount -a'. `user' indicates that normal users are allowed to mount # the file system. /dev/cdrom /cdrom iso9660 defaults,noauto,ro,user 0 0 /dev/fd0 /floppy minix defaults,noauto,user 0 0 /dev/fd1 /floppy minix defaults,noauto,user 0 0 # NFS file systems: server:/export/usr /usr nfs defaults 0 0 # proc file system: proc /proc proc defaults 0 0 sfdisk.examples.gz000066600000005547150777747460010255 0ustar00Z[w۸~~ŜɉPqN- )B%@_ߙIQ8MO& r}3l(z6REf~ vllcz+yn!S$䕂IScSbs}hQe,!% J=iqm@fPMt q:E`&/q-Mj$"Og:O- ֠ ~4V͌% FG҆λdOeo~;?{pb9'2'+T6!FR玎ufjW*I FҒxM ?=/*\8D!N'zbq 7ϫaѨKuret87K=IJvȩz tXG Oҧx8նPIMޒfК$*ReJ1}>CHtF"RHE[R6T.>@DJ̭;wh R"Ok8jWg)*.| TLڈB O+U4*v(B"td6Fu]E#xV$TYPY•zI|Fuo[sQ03Fp맒J@OS}Hj:ԍU@Dyv8S VT7VbKRMBdF?qF1ͥ?F-q)g,1.*i ė%':v+GAsyvC7\p#T+\е/8:RmZ.w5ʌi~ h<"tINNz(Q6/-5E@bȔ 84 +!:Ec ݩ}Uj8GYCt%3E,lY # CfC@T_m'drP{ { ɗvq鴺_I) gȻ5=f/ܟCؚKnͰ+-bԔHհ%DH&X>W`"Y*"8Vҍkb$C\ BW3Y誉DQ4#ܐ6Nu/CY;'F8/Nd$[gQ8)B"x9 QP~ mO2^#ơiy=z7.̭C]ڝU~5ahc_ϺXB:]R -WX"pSyfsKžcS\Zл:r=7peg;Px$եv~D,cY~fx5<1ѕ1*TRF ƨ^'~4VqoB 8k 4*0{⦂J:0k@='u"_#ey m˱q+MXDŞk't݋,^*wRj82ɍv/\$[2nVsڼF`6_>pE3%ը%r̪S[X805drk* }3*Mh?s}{HV"}MAoSԅ*U-w~wx6'OP^B*tBߟt 1.Wj?m!rUѴгQ(Y<^4o s9)vYx얞/s5rEюkR7xǭ; exa|C2m/FY!Xk:^L!es7w]*I<[ F˴+av.W2ɋj1 GJKnismމESd[4Dc hSF.C<<:=HR97>k8nW$o_]Psr^4@ ǵ3t\4%OU Sb<Ԡ=fڬ)5d30X 40lVoU.EkᅻZ_I_lhWjfSv-Y(wӳͤx}{_qܬ&|\.i<1}O5=ԨjxXU?>ia3_:GOS3\9^5iW iZlvLo53῝_n_s/= TCY"6n& >0͙y] ʶt"kQ1ޜ8(wz[찎qbO#ḱrg]^XNR۳ lrQ>܀.8ꋖ{- S(E6L1<. u& +GF%qLUʋ`U9h &a>3JD. ?!jn*Q[(Ugz*tNf20M<>S!uh|hUt9a$5Z=q ~Z;=UfFG߶ǻU>6} +{PN L}`QEү(ynsm솚{F_#"yֺX4ֈq!Z+M9hV wyׂgm-b.%%YUfa>ՃnlnDϯjU/dev/null 2>&1` ; [ $? = 4 ] ; then echo "Enhanced getopt(1)" else echo "Old getopt(1)" fi getopt-parse.tcsh000066600000004315150777747460010100 0ustar00#!/bin/tcsh # A small example program for using the new getopt(1) program. # This program will only work with tcsh(1) # An similar program using the bash(1) script language can be found # as parse.bash # Example input and output (from the tcsh prompt): # ./parse.tcsh -a par1 'another arg' --c-long 'wow\!*\?' -cmore -b " very long " # Option a # Option c, no argument # Option c, argument `more' # Option b, argument ` very long ' # Remaining arguments: # --> `par1' # --> `another arg' # --> `wow!*\?' # Note that we had to escape the exclamation mark in the wow-argument. This # is _not_ a problem with getopt, but with the tcsh command parsing. If you # would give the same line from the bash prompt (ie. call ./parse.tcsh), # you could remove the exclamation mark. # This is a bit tricky. We use a temp variable, to be able to check the # return value of getopt (eval nukes it). argv contains the command arguments # as a list. The ':q` copies that list without doing any substitutions: # each element of argv becomes a separate argument for getopt. The braces # are needed because the result is also a list. set temp=(`getopt -s tcsh -o ab:c:: --long a-long,b-long:,c-long:: -- $argv:q`) if ($? != 0) then echo "Terminating..." >/dev/stderr exit 1 endif # Now we do the eval part. As the result is a list, we need braces. But they # must be quoted, because they must be evaluated when the eval is called. # The 'q` stops doing any silly substitutions. eval set argv=\($temp:q\) while (1) switch($1:q) case -a: case --a-long: echo "Option a" ; shift breaksw; case -b: case --b-long: echo "Option b, argument "\`$2:q\' ; shift ; shift breaksw case -c: case --c-long: # c has an optional argument. As we are in quoted mode, # an empty parameter will be generated if its optional # argument is not found. if ($2:q == "") then echo "Option c, no argument" else echo "Option c, argument "\`$2:q\' endif shift; shift breaksw case --: shift break default: echo "Internal error!" ; exit 1 endsw end echo "Remaining arguments:" # foreach el ($argv:q) created problems for some tcsh-versions (at least # 6.02). So we use another shift-loop here: while ($#argv > 0) echo '--> '\`$1:q\' shift end getopt-parse.bash000066600000002734150777747460010057 0ustar00#!/bin/bash # A small example program for using the new getopt(1) program. # This program will only work with bash(1) # An similar program using the tcsh(1) script language can be found # as parse.tcsh # Example input and output (from the bash prompt): # ./parse.bash -a par1 'another arg' --c-long 'wow!*\?' -cmore -b " very long " # Option a # Option c, no argument # Option c, argument `more' # Option b, argument ` very long ' # Remaining arguments: # --> `par1' # --> `another arg' # --> `wow!*\?' # Note that we use `"$@"' to let each command-line parameter expand to a # separate word. The quotes around `$@' are essential! # We need TEMP as the `eval set --' would nuke the return value of getopt. TEMP=`getopt -o ab:c:: --long a-long,b-long:,c-long:: \ -n 'example.bash' -- "$@"` if [ $? != 0 ] ; then echo "Terminating..." >&2 ; exit 1 ; fi # Note the quotes around `$TEMP': they are essential! eval set -- "$TEMP" while true ; do case "$1" in -a|--a-long) echo "Option a" ; shift ;; -b|--b-long) echo "Option b, argument \`$2'" ; shift 2 ;; -c|--c-long) # c has an optional argument. As we are in quoted mode, # an empty parameter will be generated if its optional # argument is not found. case "$2" in "") echo "Option c, no argument"; shift 2 ;; *) echo "Option c, argument \`$2'" ; shift 2 ;; esac ;; --) shift ; break ;; *) echo "Internal error!" ; exit 1 ;; esac done echo "Remaining arguments:" for arg do echo '--> '"\`$arg'" ; done getopt-test.tcsh000066600000000170150777747460007740 0ustar00#!/bin/tcsh getopt -T >&/dev/null if ( $status == 4) then echo "Enhanced getopt(1)" else echo "Old getopt(1)" endif example-0.3.x.php000066600000010572151000035310007451 0ustar00 PHPMORPHY_STORAGE_FILE, // Enable prediction by suffix 'predict_by_suffix' => true, // Enable prediction by prefix 'predict_by_db' => true, // TODO: comment this 'graminfo_as_text' => true, ); // Path to directory where dictionaries located $dir = dirname(__FILE__) . '/../dicts'; $lang = 'ru_RU'; // Create phpMorphy instance try { $morphy = new phpMorphy($dir, $lang, $opts); } catch(phpMorphy_Exception $e) { die('Error occured while creating phpMorphy instance: ' . PHP_EOL . $e); } // All words in dictionary in UPPER CASE, so don`t forget set proper locale via setlocale(...) call // $morphy->getEncoding() returns dictionary encoding $words = array('', '', '', '', '', 'abc'); if(function_exists('iconv')) { foreach($words as &$word) { $word = iconv('windows-1251', $morphy->getEncoding(), $word); } unset($word); } try { foreach($words as $word) { // by default, phpMorphy finds $word in dictionary and when nothig found, try to predict them // you can change this behaviour, via second argument to getXXX or findWord methods $base = $morphy->getBaseForm($word); $all = $morphy->getAllForms($word); $part_of_speech = $morphy->getPartOfSpeech($word); // $base = $morphy->getBaseForm($word, phpMorphy::NORMAL); // normal behaviour // $base = $morphy->getBaseForm($word, phpMorphy::IGNORE_PREDICT); // don`t use prediction // $base = $morphy->getBaseForm($word, phpMorphy::ONLY_PREDICT); // always predict word $is_predicted = $morphy->isLastPredicted(); // or $morphy->getLastPredictionType() == phpMorphy::PREDICT_BY_NONE $is_predicted_by_db = $morphy->getLastPredictionType() == phpMorphy::PREDICT_BY_DB; $is_predicted_by_suffix = $morphy->getLastPredictionType() == phpMorphy::PREDICT_BY_SUFFIX; // this used for deep analysis $collection = $morphy->findWord($word); // or var_dump($morphy->getAllFormsWithGramInfo($word)); for debug if(false === $collection) { echo $word, " NOT FOUND\n"; continue; } else { } echo $is_predicted ? '-' : '+', $word, "\n"; echo 'lemmas: ', implode(', ', $base), "\n"; echo 'all: ', implode(', ', $all), "\n"; echo 'poses: ', implode(', ', $part_of_speech), "\n"; echo "\n"; // $collection collection of paradigm for given word // TODO: $collection->getByPartOfSpeech(...); foreach($collection as $paradigm) { // TODO: $paradigm->getBaseForm(); // TODO: $paradigm->getAllForms(); // TODO: $paradigm->hasGrammems(array('', '')); // TODO: $paradigm->getWordFormsByGrammems(array('', '')); // TODO: $paradigm->hasPartOfSpeech(''); // TODO: $paradigm->getWordFormsByPartOfSpeech(''); echo "lemma: ", $paradigm[0]->getWord(), "\n"; foreach($paradigm->getFoundWordForm() as $found_word_form) { echo $found_word_form->getWord(), ' ', $found_word_form->getPartOfSpeech(), ' ', '(', implode(', ', $found_word_form->getGrammems()), ')', "\n"; } echo "\n"; foreach($paradigm as $word_form) { // TODO: $word_form->getWord(); // TODO: $word_form->getFormNo(); // TODO: $word_form->getGrammems(); // TODO: $word_form->getPartOfSpeech(); // TODO: $word_form->hasGrammems(array('', '')); } } echo "--\n"; } } catch(phpMorphy_Exception $e) { die('Error occured while text processing: ' . $e->getMessage()); } example.php000066600000007010151000035310006676 0ustar00 PHPMORPHY_STORAGE_FILE, // Extend graminfo for getAllFormsWithGramInfo method call 'with_gramtab' => false, // Enable prediction by suffix 'predict_by_suffix' => true, // Enable prediction by prefix 'predict_by_db' => true ); // Path to directory where dictionaries located $dir = dirname(__FILE__) . '/../dicts'; // Create descriptor for dictionary located in $dir directory with russian language $dict_bundle = new phpMorphy_FilesBundle($dir, 'rus'); // Create phpMorphy instance try { $morphy = new phpMorphy($dict_bundle, $opts); } catch(phpMorphy_Exception $e) { die('Error occured while creating phpMorphy instance: ' . $e->getMessage()); } // All words in dictionary in UPPER CASE, so don`t forget set proper locale // Supported dicts and locales: // *------------------------------* // | Dict. language | Locale name | // |------------------------------| // | Russian | cp1251 | // |------------------------------| // | English | cp1250 | // |------------------------------| // | German | cp1252 | // *------------------------------* // $codepage = $morphy->getCodepage(); // setlocale(LC_CTYPE, array('ru_RU.CP1251', 'Russian_Russia.1251')); // Hint: in this example words $word_one, $word_two are in russian language(cp1251 encoding) $word_one = ''; $word_two = ''; echo "Testing single mode...\n"; try { // word by word processing // each function return array with result or FALSE when no form(s) for given word found(or predicted) $base_form = $morphy->getBaseForm($word_one); $all_forms = $morphy->getAllForms($word_one); $pseudo_root = $morphy->getPseudoRoot($word_one); if(false === $base_form || false === $all_forms || false === $pseudo_root) { die("Can`t find or predict $word_one word"); } echo 'base form = ' . implode(', ', $base_form) . "\n"; echo 'all forms = ' . implode(', ', $all_forms) . "\n"; echo "Testing bulk mode...\n"; // bulk mode speed-ups processing up to 50-100%(mainly for getBaseForm method) // in bulk mode all function always return array $bulk_words = array($word_one, $word_two); $base_form = $morphy->getBaseForm($bulk_words); $all_forms = $morphy->getAllForms($bulk_words); $pseudo_root = $morphy->getPseudoRoot($bulk_words); // Bulk result format: // array( // INPUT_WORD1 => array(OUTWORD1, OUTWORD2, ... etc) // INPUT_WORD2 => FALSE <-- when no form for word found(or predicted) // ) echo 'bulk mode base form = ' . implode(', ', $base_form[$word_one]) . ' ' . implode(', ', $base_form[$word_two]) . "\n"; echo 'bulk mode all forms = ' . implode(', ', $all_forms[$word_one]) . ' ' . implode(', ', $all_forms[$word_two]) . "\n"; // You can also retrieve all word forms with graminfo via getAllFormsWithGramInfo method call // $all_forms_with_gram = $morphy->getAllFormsWithGramInfo($word_one); } catch(phpMorphy_Exception $e) { die('Error occured while text processing: ' . $e->getMessage()); }