⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 man.diff

📁 speech signal process tools
💻 DIFF
📖 第 1 页 / 共 2 页
字号:
.fiHere, <field_name> is a FEA record field name, <index> is an integervalue indicating an offset from the beginning of the field (used ifthe field is not a scaler), <value> is a numerical value, <character_string> is a character string in quotes ("),<function> is the name of a built in function (see FUNCTIONS),<rel_op> is a relational operator, and <arith_op> is aarithmetic operator (defined below).<external_function> is the name of an external program that is called toimplement some function on each record.  This is described in detailbelow.The "{}" brackets indicatethat the inclusion of field index is optional. If <field_name> is not a scaler field, <field_name> is equivalent to<field_name>[0] when used in an expression.   An <external_function> is always preceded by a dollar sign ($)..PPIf a <field_name> is used in an expression which is not defined in thecurrent input file, then a warning is printed (once for each file) andzero is used as its value.   This is not a fatal error, becausethere might be several input files open that do not have all of the samefields..PPThe permitted relational are:.sp.TScenter,box,tab(;);c sl l.<rel_op>===;equals\&=;equals!=;not equals>;greater than>=;greater than or equal to<;less than<=;less than or equal to&&;and&;and||;or	    |;or.TE.PPThe && has precedence over the || ; & and | aretreated as synonyms for && and ||.   There are no bitwise logicaloperations..PPThe permitted arithmetic operators are:.sp.TScenter,box,tab(;);c sl l.<arith_op>=+;addition\-;subtraction*;multiplication/;division^;exponentiation.TE.PPThe ^ operator has the highest precedence and is right associative.  The/ and * operators have the next highest precedence and are leftassociative.  The + and \- operators have the lowest precedence and arealso left associative..PPIf <value> is a numerical value (appropriate if the type of the fieldis a numerical type), it should be given in a corresponding formatfor C constants.  If the field type is coded, then <value> should bea quoted string (upper or lower case) that is one of the legal values..PPIn the case of coded field types, the default behavior is for the comparisonto be case insensitive.  Comparisons can be made case sensitive by usingthe \fB-c\fR option on the command line..SH FUNCTIONS.PPThere are three types of functions supported by \fIselect\fR.One type of function takes as its domain a numerical value, which can begiven as any expression that \fIselect\fR can process.   Another type offunction operates on a <field_name>.  The third type of function is the<external_function>.  This form of function results in an externalprogram being called to perform some function on each record.This provides a very general capability, but since the external programwill be called for each record processed it is much slower than built infunctions..PPThe available built in function are:.sp.TScenter,box,tab(;);c sl l.Functions on Expressions=abs;absolute valueatan;arc tangentcos;cosineexp;exponentint;integerlog;natural loglog10;log base 10sin;sinesqrt;square roottan;tangent.TE.sp.TScenter,box, tab(;);c sl l.Functions on Fields=max;maximum of elements in fieldmean;mean of elements in fieldmin;minimum of elements in fieldprod;product of elements in fieldsize;number of elements in fieldsum;sum elements in field.TE.PPThe only legal argument for functions on fields is a single<field_name> without an index.  In this case, the <field_name> refers tothe entire field..PPIf <external_function> is found in an expression.I selectsearches the users current PATH for a program with the specifiedname.  This program is assumed to accept a single-record ESPS FEA fileas its only argument and to output a value (ASCII) on standard output.  .I Selectcreates a single-record ESPS file from each record in the input files and calls <external_function> with this file; theoutput of <external_function> is then used within the query.  An example of the source code for an external function can be foundin the \fIselect\fR source directory, or in /usr/sps/lib on a non-sourcesystem..PPThere are several built in field names that have special meaning.  Theare:.sp.TScenter,box, tab(;);c sl l.Built in Field Names=tag;built in tag field of the recordREC;record number (from 1)FILE;file name of the input file within the set of input files.TEThe field name "tag" always refers to the built in tag field of therecord.  (See the discussion of tags and segment labelling underDESCRIPTION.)The name "REC" refers to the record number (from 1) of therecord in the set of input files andthe name "FILE" refers to the filename of the input file in theset of input files..SH "EXPRESSION ERRORS".PPThere are three types of expression errors.  .PPThe first type are syntaxerrors caught by the parser.   These result result in a "syntax error"message followed by the offending character.   In the current release,the query is usually executed anyway.   If the selected records are notwanted, they can be removed from the buffer with the \fBUNDO\fR command.If the select is long (because the input file is large) then the selectcan be interrupted and then undone.   This will be improved in a futurerelease..PPThe other type of expression errors relate to the execution of theexpression itself.  These include use of undefined fields, undefinedfunctions, field indexes out of bounds, arithmetic overflow andunderflow, and divide by zero.   Errors that cannot change from onerecord or one input file to the next are considered fatal and terminatethe \fBSELECT\fR (or \fBEVAL\fR or \fBSHOW SELECT\fR).  This type oferror is caused by trying to call an undefined built in function ortrouble running an external function..PPThe other errors described above cause the termination of theexpression for the current record.  In most cases the expressionevaluates to zero.  In the case of undefined field and index out ofbounds, zero is returned and the expression continues.   In the case ofarithmetic problems, the expression is terminated and zero is returnedfor the expression.  The reason that these errors are not fatal is thatseveral input files might be open and they do not have to all have thesame fields.   A field might not be defined for one file of the inputset, but might be defined for others.  Therefore, the query should beallowed to process.   A message is printed, once for each file, in thecase of these errors.   The query can be interrupted if the desiredresults will not be achieved..PPIn all cases a message is printed stating what action is being takenwhen errors are found..SH "ESPS PARAMETERS".PPThe ESPS parameter file is not read by .I select.  .SH "ESPS COMMON".PPESPS Common file is not read or written by .I select..SH ESPS HEADERS.PP.I Selectreads the .I common.typefield from the header of .I input(to make sure that it is of type FEA), and it reads thefield-defining information as well.  If output files do not exist, their headers are created with .I copy_header(3\-ESPS).  Unless the \fB\-n\fP option is used, the headers of output files are expandedto include the the input files as sources and the selection queries as comments in the \fIvariable.comment\fP field.  .SH ENVIRONMENT.PPThe.B PAGERenvironment variable determines what paging program is used to break uplarge displays of text. By default, the.I moreprogram is used (however, this may be changed by the installer).To use a different pager (or if your system doesn't have.IR more ),set this environment variable to some other value.  A full pathname is notrequired.  If you don't like paging, try setting.B PAGERto.IR cat ..SH EXAMPLES.PP.nf\fIThis command gathers all voiced from the input files into allvoiced.fea\fRselect -q 'frame_type == "VOICED"' -o allvoiced.fea *.fana\fIThis command applies a command file of queries on file1 with output to file2\fRselect -o file2 file1 < commandsExamples of queries:	select pulse_len = 90 & frame_type = "VOICED"  \fIframe_type is a CODED type\fR	select (a = 3 & FILE = "f1") | (b = 4 & FILE = "f2")  \fIthis means to select records with a = 3 from input file  f1 and b = 4 from input file f2; assuming that there  are at least two input files\fRselect sqrt(gamma)/4 > alpha[3]  \fIIf gamma is a field of size one, then its value is used by the sqrt  function.   If gamma is a field of greater than size one, then the  element is used (same as saying gamma[0]).\fRselect sum(gamma) > mean(beta)  \fIThese functions operate on entire fields, so the fieldname here   without the index does not refer to only the first element; it refers  to the entire field.\fRselect sum(gamma) > mean(beta) && ($func1 > 45.6)  \fIsum and mean are functions of fields.  $func1 is a user supplied  external program which is called for each record..fi.SH "SEE ALSO".PPESPS(5-ESPS), FEA(5\-ESPS).SH "FUTURE CHANGES".PPProvide a method to link in user-defined functions to provide higherperformance than external functions..SH "WARNINGS".PPA number of warning and error message are printed in the event ofvarious expression errors.  Some errors terminate the query..SH "BUGS".PPThe following paragraph describes the way \fIselect\fR will handleexisting output files and input files with tags:.PPIf the output file exists and is segment labelled, and if thereis one or more tagged input file, all tagged records written to the outputfile are converted to segment labelled.  If the output file exists and istagged, and if there is one or more tagged input file, the output file isconverted from tagged to segment labelled, and all tagged records writtento the output file are converted to segment labelled.  .PPThis is not done in this version.   The pre-existing output file is notchanged, and the tag values copied into it may be meaningless (becausethe \fIrefer\fR file might be different..PPA syntax error in a query will terminate the parse of the query andit will then run.   After it runs you will get a syntax error message.If the select, selected records that you don't want, use the "undo"command to undo the effect of the most recent select operation.  Undocan only be used once after each select.  You can't undo an undo(except to select again)..PPIf referenced fieldname is a complex feature field, then the real partof that is used in the expression.   Better support for complex typeswill be added in the next version..SH "AUTHOR".PPManual page by John Shore and Alan Parker.brProgram by Alan Parker

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -