libsent/src/util/readfile.c

様々な入力からテキストを行単位で読み込む関数群 [詳細]

#include <sent/stddefs.h>
#include <sent/tcpip.h>
#include <zlib.h>
readfile.cのインクルード依存関係図

ソースコードを見る。

関数

char * getl (char *buf, int maxlen, FILE *fp)
char * getl_fp (char *buf, int maxlen, FILE *fp)
char * getl_fd (char *buf, int maxlen, int fd)
char * getl_sd (char *buf, int maxlen, int sd)
char * first_token (char *buf)
char * next_token ()
char * next_token_if_any ()
char * rest_token ()

説明

様々な入力からテキストを行単位で読み込む関数群

作者:
Akinobu LEE
日付:
Thu Feb 17 16:41:58 2005

入力ストリームやファイルデスクプリタなど,様々なソースから テキスト入力を行単位で読み込むための関数群です. 読み込み時において,空行は無視されます.また行末の改行は削除されます.

Revision
1.3

readfile.c で定義されています。


関数

char* getl ( char *  buf,
int  maxlen,
FILE *  fp 
)

Read one line from file that has been opened by fopen_readfile(). Blank line will be skipped.

引数:
buf [out] data buffer
maxlen [in] maximum length of above
fp [in] file pointer or gzFile pointer
戻り値:
the buffer buf, or NULL on EOF or error.

readfile.c52 行で定義されています。

参照元 add_bigram_rl(), add_unigram(), ngram_read_arpa(), rddfa(), rdhmmlist(), read_token(), set_and_check_total_info(), set_bigram(), set_total_info(), set_trigram(), set_unigram(), と voca_load_htkdict().

char* getl_fp ( char *  buf,
int  maxlen,
FILE *  fp 
)

Read one line from file pointer. Blank line will be skipped.

引数:
buf [out] data buffer
maxlen [in] maximum length of above
fp [in] file pointer
戻り値:
the buffer buf, or NULL on EOF or error.

readfile.c86 行で定義されています。

参照元 adin_file_begin(), adin_sndfile_begin(), htk_config_file_parse(), mfcfilelist_nextfile(), と multigram_add_prefix_filelist().

char* getl_fd ( char *  buf,
int  maxlen,
int  fd 
)

Read one line from a file descriptor. Blank line will be skipped.

引数:
buf [out] data buffer
maxlen [in] maximum length of above
fd [in] file descriptor
戻り値:
the buffer buf, or NULL on EOF or error.

readfile.c114 行で定義されています。

参照元 msock_check_and_process_command(), msock_exec_command(), msock_process_command(), rddfa_fd(), と voca_load_htkdict_fd().

char* getl_sd ( char *  buf,
int  maxlen,
int  sd 
)

Read one line from a socket descriptor. Blank line will be skipped.

引数:
buf [out] data buffer
maxlen [in] maximum length of above
sd [in] socket descpritor
戻り値:
the buffer buf, or NULL on EOF or error.

readfile.c151 行で定義されています。

参照元 msock_check_and_process_command(), msock_exec_command(), msock_process_command(), rddfa_sd(), と voca_load_htkdict_sd().

char* first_token ( char *  buf  ) 

Return first token of a buffer, delimited by DELM. Program will terminate if any token does not found.

引数:
buf [i/o] string buffer
戻り値:
pointer to the extracted token.

readfile.c186 行で定義されています。

参照元 add_bigram_rl(), add_unigram(), new_str2phseq(), rddfa_line(), rdhmmlist(), set_bigram(), set_trigram(), と set_unigram().

char* next_token ( void   ) 

Return next token of a buffer, delimited by DELM. Should be called after first_token(). Program will terminate if any token does not found.

戻り値:
pointer to the extracted token.

readfile.c202 行で定義されています。

参照元 add_bigram_rl(), add_unigram(), rddfa_line(), set_bigram(), set_trigram(), と set_unigram().

char* next_token_if_any ( void   ) 

Return next token of a buffer, delimited by DELM. Should be called after first_token().

戻り値:
pointer to the extracted token, or NULL if not found.

readfile.c216 行で定義されています。

参照元 new_str2phseq(), と rdhmmlist().

char* rest_token ( void   ) 

Return the rest tokens till newline. Program will terminate if any token does not found.

戻り値:
pointer to the extracted token.

readfile.c230 行で定義されています。


Juliusに対してTue Sep 22 00:15:36 2009に生成されました。  doxygen 1.6.0