TRAMORPH ITC-IRST - November 1998 usage.txt Usage of TRAMORPH is: tramorph [-c|-e|-h|-s|-t] [-f input-file] [-p morpho-path] options [-c|-e|-h|-s|-t] control the output: -c[compress] (default) shows stems, tags, transcriptions; -t[ranscription] is equal to -c, buth without prompt (batch use); -e[xpanded] shows all info and expanded tags; -h[isto] reports, for each word, the number of scompositions found; -s[pell] rewrites only non-recognized words. input-file contains the words to analyze, intended as tokens separated by white spaces (if not specified, stdin is used); morpho-path is the dir containing the morphological database. There must be a dir containing the following files: lab_cod # association between morpho-labels and morpho-codes labels # association between short labels ans expanded labels soundlex.ds # morpho-lexicon The name of the dir (default ./data) can be specified to tramorph either by defining the environment variable TRAMORPHPATH (see examples below) or by using the -p switch (which overwrites the others). setenv TRAMORPHPATH /usr/local/lib/tramorph/ # under unix systems set TRAMORPHPATH=c:/tramorph/ # under windows The input file (option -f) or stdin must contain words separated by blanks, tabs and newlines; any other char will be considered part of the token. Each word must be composed by a maximum of 80 characters, comprending only [a-zA-Z\'\`\-]. No distinction between uppercase and lowercase applies (roberto, Roberto, ROBERTO, RoBeRtO are equivalent). Characters "'" and "`" represent indifferently accent or apostrophe. The character "-" is used in compounds, like NEW-YORK or LA-SPEZIA (town). Any token containing chars outside the previusly defined will be rejected. No punctuation chars are allowed. To overcome these limitations, a preprocess like bin/transcribe.pl could be used (see transcrition.txt for more info). The output to an input is composed of the following items, depending on the switch chosen: # the word itself (always returned) # the stem from which the word has been recognized # (it often corresponds to the real stem, apart some # exceptions: very irregular verbs, words belonging to # some classes which are handled as exceptions in order # to limit the rule set, etc.) # part of speech; separator is "." (es: S.M.PL.) # expanded part of speech; separator is "." # (es: SOSTANTIVO.MASCHILE.PLURALE.) # phonetic transcription; separator is "_" # (es: p_@sch_r_o_d_u_Z_j_oo_n_e_) ======================================================== Example: input file test: La produzione industriale ha subito una flessione . ======================================================== Command: tramorph -c -f test or tramorph -f test or tramorph -t -f test Output for each word (apart prompt in case of stdin): [ ] * \n La LA S.M.SING. l_aa_ LA S.M.PL. l_aa_ LA PRON.DIM. l_a_ LA PRON. l_a_ LA ART.DET.F.SING. l_a_ produzione PRODUZIONE S.F.SING. p_@sch_r_o_d_u_Z_j_oo_n_e_ industriale INDUSTRIALE S.M.SING. i_n_d_u_X_t_@sch_r_j_aa_l_e_ INDUSTRIALE S.F.SING. i_n_d_u_X_t_@sch_r_j_aa_l_e_ INDUSTRIALE AGG.M.SING. i_n_d_u_X_t_@sch_r_j_aa_l_e_ INDUSTRIALE AGG.F.SING. i_n_d_u_X_t_@sch_r_j_aa_l_e_ INDUSTRIARE V.GEN.VIMP.PRES.PIIS.CLIT. i_n_d_uu_X_t_@sch_r_j_a_l_e_ ha HA V.AUSIL.VIND.PRES.PIIIS. aa_ HA V.GEN.VIND.PRES.PIIIS. aa_ HA INTER. aa_ subito SUBITO LOC.CONGVA. X_uu_b_i_t_o_ SUBITO AVV. X_uu_b_i_t_o_ SUBITO S.M.SING. X_uu_b_i_t_o_ SUBITO AGG.M.SING. X_uu_b_i_t_o_ SUBIRE V.GEN.VPART.PASS.M.SING. X_u_b_ii_t_o_ una UNA S.F.PL. uu_n_a_ UNA AGG.NUM.CAR.F.SING. uu_n_a_ UNA PRON.IND. uu_n_a_ UNA ART.INDET.F.SING. uu_n_a_ flessione FLESSIONE S.F.SING. f_l_e_XX_j_oo_n_e_ . ======================================================== Command: tramorph -e -f test Output for each word (apart prompt in case of stdin): \n [ da \n ] * \n La da LA l_aa_ SOSTANTIVO.MASCHILE.SINGOLARE. da LA l_aa_ SOSTANTIVO.MASCHILE.PLURALE. da LA l_a_ PRONOME.DIMOSTRATIVO. da LA l_a_ PRONOME. da LA l_a_ ARTICOLO.DETERMINATIVO.FEMMINILE.SINGOLARE. produzione da PRODUZIONE p_@sch_r_o_d_u_Z_j_oo_n_e_ SOSTANTIVO.FEMMINILE.SINGOLARE. industriale da INDUSTRIALE i_n_d_u_X_t_@sch_r_j_aa_l_e_ SOSTANTIVO.MASCHILE.SINGOLARE. da INDUSTRIALE i_n_d_u_X_t_@sch_r_j_aa_l_e_ SOSTANTIVO.FEMMINILE.SINGOLARE. da INDUSTRIALE i_n_d_u_X_t_@sch_r_j_aa_l_e_ AGGETTIVO.MASCHILE.SINGOLARE. da INDUSTRIALE i_n_d_u_X_t_@sch_r_j_aa_l_e_ AGGETTIVO.FEMMINILE.SINGOLARE. da INDUSTRIARE i_n_d_uu_X_t_@sch_r_j_a_l_e_ VERBO.GENERICO.IMPERATIVO.PRESENTE.SECONDA-PERSONA-SINGOLARE.CLITICO. ha da HA aa_ VERBO.AUSILIARE.INDICATIVO.PRESENTE.TERZA-PERSONA-SINGOLARE. da HA aa_ VERBO.GENERICO.INDICATIVO.PRESENTE.TERZA-PERSONA-SINGOLARE. da HA aa_ INTERIEZIONE. subito da SUBITO X_uu_b_i_t_o_ LOCUZIONE.CONGIUNTIVA. da SUBITO X_uu_b_i_t_o_ AVVERBIO. da SUBITO X_uu_b_i_t_o_ SOSTANTIVO.MASCHILE.SINGOLARE. da SUBITO X_uu_b_i_t_o_ AGGETTIVO.MASCHILE.SINGOLARE. da SUBIRE X_u_b_ii_t_o_ VERBO.GENERICO.PARTICIPIO.PASSATO.MASCHILE.SINGOLARE. una da UNA uu_n_a_ SOSTANTIVO.FEMMINILE.PLURALE. da UNA uu_n_a_ AGGETTIVO.NUMERALE.CARDINALE.FEMMINILE.SINGOLARE. da UNA uu_n_a_ PRONOME.INDEFINITO. da UNA uu_n_a_ ARTICOLO.INDETERMINATIVO.FEMMINILE.SINGOLARE. flessione da FLESSIONE f_l_e_XX_j_oo_n_e_ SOSTANTIVO.FEMMINILE.SINGOLARE. . ======================================================== Command: tramorph -h -f test Output for each word (apart prompt in case of stdin): count \n 5 La 1 produzione 5 industriale 3 ha 5 subito 4 una 1 flessione 0 . ======================================================== Command: tramorph -s -f test Output for each unrecognized word: \n . ========================================================