php_mecab API
php_mecab-0.2.0の関数一覧を整形してみました。
- mecab_version - Get the version number of MeCab.
- mecab_split - Split string into an array of morphemes.
- mecab_new - Create new tagger resource of MeCab.
- mecab_destroy - Free the tagger.
- mecab_sparse_tostr - Get the parse result as a string.
- mecab_sparse_tonode - Get the parse result as a node.
- mecab_nbest_sparse_tostr - Get the N-Best list as a string.
- mecab_nbest_init - Initialize the N-Best list.
- mecab_nbest_next_tostr - Get the next result of N-Best as a string.
- mecab_nbest_next_tonode - Get the next result of N-Best as a node.
- mecab_format_node - Format a node to string. The format is specified by "-O" option or --{node|unk|bos|eos}-format=STR. The detail is found in the web site and/or the manpage of MeCab.
- mecab_dictionary_info - Get the information of using dictionary as an associative array.
- mecab_node_toarray - Get all elements of the node as an associated array.
- mecab_node_tostring - Get the formatted string of the node.
- mecab_node_current - [Iterator implementation] Return the current element.
- mecab_node_key - [Iterator implementation] Return the key of the current element.
- mecab_node_valid - [Iterator implementation] Check if there is a current element after calls to rewind() or next().
- mecab_node_rewind - [Iterator implementation] Set the node pointer to the beginning.
- mecab_node_next - Get the next node.
- mecab_node_prev - Get the previous node.
- mecab_node_next - Get the next node.
- mecab_node_enext - Get the enext node.
- mecab_node_bnext - Get the bnext node.
- mecab_node_rpath - Get the rpath.
- mecab_node_lpath - Get the lpath.
- mecab_node_begin_node_list - Get the given index of begin-node list.
- mecab_node_end_node_list - Get the given index of end-node list.
- mecab_node_surface - Get the surface.
- mecab_node_feature - Get the feature.
- mecab_node_id - Get the ID.
- mecab_node_length - Get the length of the surface.
- mecab_node_rlength - Get the length of the surface and its leading whitespace.
- mecab_node_rcattr - Get the ID of the right context.
- mecab_node_lcattr - Get the ID of the left context.
- mecab_node_posid - Get the ID of the Part-of-Speech. (node->posid is not used in MeCab-0.90)
- mecab_node_char_type - Get the type of the character.
- mecab_node_stat - Get the status.
- mecab_node_isbest - Determine whether the node is the best solution.
- mecab_node_alpha - Get the forward log probability.
- mecab_node_beta - Get the backward log probability.
- mecab_node_prob - Get the marginal probability.
- mecab_node_wcost - Get the word arising cost.
- mecab_node_cost - Get the cumulative cost.
- mecab_path_rnext - Get the rnext path.
- mecab_path_lnext - Get the lnext path.
- mecab_path_rnode - Get the rnode.
- mecab_path_lnode - Get the lnode.
- mecab_path_prob - Get the marginal probability.
- mecab_path_cost - Get the cumulative cost.
mecab_version - Get the version number of MeCab.
* string mecab_version(void)
|
* @return string The version of linked MeCab library.
|
mecab_split - Split string into an array of morphemes.
* array mecab_split(string str[, string dicdir[, string userdic[, callback filter]]])
* array MeCab_Tagger::split(string str[, string dicdir[, string userdic[, callback filter]]])
|
* @param string $str The target string.
* @param string $dicdir The path for system dictionary.
* @param string $userdic The path for user dictionary.
* @param callback $filter A filter function or method.
* @return array
|
mecab_new - Create new tagger resource of MeCab.
* resource mecab mecab_new([array options])
* object MeCab_Tagger MeCab_Tagger::__construct([array options])
|
* @param array $options The analysis/output options. (optional)
* The values are same to command line options.
* The detail is found in the web site and/or the manpage of MeCab.
* @return resource mecab A tagger resource of MeCab.
|
mecab_destroy - Free the tagger.
* void mecab mecab_destroy(resource mecab mecab)
* void MeCab_Tagger::__destruct()
|
* @param resource mecab $mecab The tagger resource of MeCab.
* @return void
|
mecab_sparse_tostr - Get the parse result as a string.
* string mecab_sparse_tostr(resource mecab mecab, string str[, int len[, int olen]])
* string MeCab_Tagger::parse(string str[, int len[, int olen]])
* string MeCab_Tagger::parseToString(string str[, int len[, int olen]])
|
* @param resource mecab $mecab The tagger resource of MeCab.
* @param string $str The parse target.
* @param int $len The maximum length that can be analyzed. (optional)
* @param int $olen The limit length of the output buffer. (optional)
* @return string The parse result.
* If output buffer has overflowed, returns false.
|
mecab_sparse_tonode - Get the parse result as a node.
* resource mecab_node mecab_sparse_tonode(resource mecab mecab, string str[, int len])
* object MeCab_Node MeCab_Tagger::parseToNode(string str[, int len])
|
* @param resource mecab $mecab The tagger resource of MeCab.
* @param string $str The parse target.
* @param int $len The maximum length that can be analyzed. (optional)
* @return resource mecab_node The result node of given string.
|
mecab_nbest_sparse_tostr - Get the N-Best list as a string.
* string mecab_nbest_sparse_tostr(resource mecab mecab, int n, string str[, int len[, int olen]])
* string MeCab_Tagger::parseNBest(int n, string str[, int len[, int olen]])
|
* @param resource mecab $mecab The tagger resource of MeCab.
* @param int $n The number of the result list.
* @param string $str The parse target.
* @param int $len The maximum length that can be analyzed. (optional)
* @param int $olen The maximum length of the output. (optional)
* @return string The N-Best list.
* If output buffer has overflowed, returns false.
|
mecab_nbest_init - Initialize the N-Best list.
* bool mecab_nbest_init(resource mecab mecab, string str[, int len])
* bool MeCab_Tagger::parseNBestInit(string str[, int len])
|
* @param resource mecab $mecab The tagger resource of MeCab.
* @param string $str The parse target.
* @param int $len The maximum length that can be analyzed. (optional)
* @return bool True if succeeded to initilalize, otherwise returns false.
|
mecab_nbest_next_tostr - Get the next result of N-Best as a string.
* string mecab_nbest_next_tostr(resource mecab mecab[, int olen])
* string MeCab_Tagger::next([int olen]])
|
* @param resource mecab $mecab The tagger resource of MeCab.
* @param int $olen The maximum length of the output. (optional)
* @return string The parse result of the next pointer.
* If there are no more results, returns false.
* Also returns false if output buffer has overflowed.
|
mecab_nbest_next_tonode - Get the next result of N-Best as a node.
* resource mecab_node mecab_nbest_next_tonode(resource mecab mecab)
* object MeCab_Node MeCab_Tagger::nextNode(void)
|
* @param resource mecab $mecab The tagger resource of MeCab.
* @return resource mecab_node The result node of the next pointer.
* If there are no more results, returns false.
|
mecab_format_node - Format a node to string. The format is specified by "-O" option or --{node|unk|bos|eos}-format=STR. The detail is found in the web site and/or the manpage of MeCab.
* string mecab_format_node(resource mecab mecab, resource mecab_node node)
* string MeCab_Tagger::formatNode(object MeCab_Node node)
|
* @param resource mecab $mecab The tagger resource of MeCab.
* @param resource mecab_node $node The node of the source string.
* @return string The formatted string.
|
mecab_dictionary_info - Get the information of using dictionary as an associative array.
* array mecab_dictionary_info(resource mecab mecab)
* array MeCab_Tagger::dictionaryInfo(void)
|
* @return array The information of the dictionary.
|
mecab_node_toarray - Get all elements of the node as an associated array.
* array mecab_node_toarray(resource mecab_node node)
* array MeCab_Node::toArray(void)
|
* @param resource mecab_node $node The node of the source string.
* @param bool $dump_all Whether dump all related nodes and paths or not.
* @return array All elements of the node.
|
mecab_node_tostring - Get the formatted string of the node.
* string mecab_node_tostring(resource mecab_node node)
* string MeCab_Node::toString(void)
* string MeCab_Node::__toString(void)
|
* @param resource mecab_node $node The node of the source string.
* @return string The formatted string.
* @see mecab_format_node
|
mecab_node_current - [Iterator implementation] Return the current element.
* resource mecab_node mecab_node_current(resource mecab_node node)
* object MeCab_Node MeCab_Node::current(void)
|
* @param resource mecab_node $node The node of the source string.
* @param resource mecab_node Just a copy of given resource.
|
mecab_node_key - [Iterator implementation] Return the key of the current element.
* int mecab_node_key(resource mecab_node)
* int MeCab_Node::key(void)
|
* @param resource mecab_node $node The node of the source string.
* @return int The cumulative cost of the node.
|
mecab_node_valid - [Iterator implementation] Check if there is a current element after calls to rewind() or next().
* bool mecab_node_valid(resource mecab_node)
* bool MeCab_Node::valid(void)
|
* @param resource mecab_node $node The node of the source string.
* @return bool True if there is an element after the current element, otherwise returns false.
|
mecab_node_rewind - [Iterator implementation] Set the node pointer to the beginning.
* bool mecab_node_rewind(resource mecab_node node)
* bool MeCab_Node::rewind(void)
|
* @param resource mecab_node $node The node of the source string.
* @return bool Always true.
|
mecab_node_next - Get the next node.
* resource mecab_node mecab_node_next(resource mecab_node node)
* object MeCab_Node MeCab_Node::getNext(void)
|
* @param resource mecab_node $node The node of the source string.
* @return resource mecab_node The next node.
* If the given node is the last one, returns FALSE.
|
mecab_node_prev - Get the previous node.
* resource mecab_node mecab_node_prev(resource mecab_node node)
* object MeCab_Node MeCab_Node::getPrev(void)
|
* @param resource mecab_node $node The node of the source string.
* @return resource mecab_node The previous node.
* If the given node is the first one, returns FALSE.
|
mecab_node_next - Get the next node.
* resource mecab_node mecab_node_next(resource mecab_node node)
* object MeCab_Node MeCab_Node::getNext(void)
|
* @param resource mecab_node $node The node of the source string.
* @return resource mecab_node The next node.
* If the given node is the last one, returns FALSE.
|
mecab_node_enext - Get the enext node.
* resource mecab_node mecab_node_enext(resource mecab_node node)
* object MeCab_Node MeCab_Node::getENext(void)
|
* @param resource mecab_node $node The node of the source string.
* @return resource mecab_node The next node which has same end point as the given node.
* If there is no `enext' node, returns false.
|
mecab_node_bnext - Get the bnext node.
* resource mecab_node mecab_node_bnext(resource mecab_node node)
* object MeCab_Node MeCab_Node::getBNext(void)
|
* @param resource mecab_node $node The node of the source string.
* @return resource mecab_node The next node which has same beggining point as the given one.
* If there is no `bnext' node, returns false.
|
mecab_node_rpath - Get the rpath.
* resource mecab_path mecab_node_rpath(resource mecab_node node)
* object MeCab_Path MeCab_Node::getRPath(void)
|
* @param resource mecab_node $node The node of the source string.
* @return resource mecab_path The next node which has same end point as the given node.
* If there is no `rpath' node, returns false.
|
mecab_node_lpath - Get the lpath.
* resource mecab_path mecab_node_lpath(resource mecab_node node)
* object MeCab_Path MeCab_Node::getLPath(void)
|
* @param resource mecab_node $node The node of the source string.
* @return resource mecab_path The next node which has same beggining point as the given one.
* If there is no `lpath' node, returns false.
|
mecab_node_begin_node_list - Get the given index of begin-node list.
* resource mecab_node mecab_node_begin_node_list(resource mecab_node node, int index)
|
* @param resource mecab_node $node The node of the source string.
* @param int $index An indexo of the node.
* @return resource mecab_node
* @see mecab_node_end_node_list
|
mecab_node_end_node_list - Get the given index of end-node list.
* resource mecab_node mecab_node_end_node_list(resource mecab_node node, int index)
|
* @param resource mecab_node $node The node of the source string.
* @param int $index An indexo of the node.
* @return resource mecab_node
* @see mecab_node_begin_node_list
|
mecab_node_surface - Get the surface.
* string mecab_node_surface(resource mecab_node node)
* string MeCab_Node::getSurface(void)
|
* @param resource mecab_node $node The node of the source string.
* @return string The surface of the node.
|
mecab_node_feature - Get the feature.
* string mecab_node_feature(resource mecab_node node)
* string MeCab_Node::getFeature(void)
|
* @param resource mecab_node $node The node of the source string.
* @return string The feature of the node.
|
mecab_node_id - Get the ID.
* int mecab_node_id(resource mecab_node node)
* int MeCab_Node::getId(void)
|
* @param resource mecab_node $node The node of the source string.
* @return int The ID of the node.
|
mecab_node_length - Get the length of the surface.
* int mecab_node_length(resource mecab_node node)
* int MeCab_Node::getLength(void)
|
* @param resource mecab_node $node The node of the source string.
* @return int The length of the surface of the node.
|
mecab_node_rlength - Get the length of the surface and its leading whitespace.
* int mecab_node_rlength(resource mecab_node node)
* int MeCab_Node::getRLength(void)
|
* @param resource mecab_node $node The node of the source string.
* @return int The length of the surface and its leading whitespace of the node.
|
mecab_node_rcattr - Get the ID of the right context.
* int mecab_node_rcattr(resource mecab_node node)
* int MeCab_Node::getRcAttr(void)
|
* @param resource mecab_node $node The node of the source string.
* @return int The ID of the right context.
|
mecab_node_lcattr - Get the ID of the left context.
* int mecab_node_lcattr(resource mecab_node node)
* int MeCab_Node::getLcAttr(void)
|
* @param resource mecab_node $node The node of the source string.
* @return int The ID of the left context.
|
mecab_node_posid - Get the ID of the Part-of-Speech. (node->posid is not used in MeCab-0.90)
* int mecab_node_posid(resource mecab_node node)
* int MeCab_Node::getPosId(void)
|
* @param resource mecab_node $node The node of the source string.
* @return int The ID of the Part-of-Speech.
* Currently, always returns 0.
|
mecab_node_char_type - Get the type of the character.
* int mecab_node_char_type(resource mecab_node node)
* int MeCab_Node::getCharType(void)
|
* @param resource mecab_node $node The node of the source string.
* @return int The type of the character.
|
mecab_node_stat - Get the status.
* int mecab_node_stat(resource mecab_node node)
* int MeCab_Node::getStat(void)
|
* @param resource mecab_node $node The node of the source string.
* @return int The status of the node.
* The return value is one of the following:
* MECAB_NOR_NODE (0:Normal)
* MECAB_UNK_NODE (1:Unknown)
* MECAB_BOS_NODE (2:Beginning-of-Sentence)
* MECAB_EOS_NODE (3:End-of-Sentence)
|
mecab_node_isbest - Determine whether the node is the best solution.
* bool mecab_node_isbest(resource mecab_node node)
* bool MeCab_Node::getIsBest(void)
|
* @param resource mecab_node $node The node of the source string.
* @return bool True if the node is the best, otherwise returns false.
|
mecab_node_alpha - Get the forward log probability.
* double mecab_node_alpha(resource mecab_node node)
* double MeCab_Node::getAlpha(void)
|
* @param resource mecab_node $node The node of the source string.
* @return double The forward log probability of the node.
|
mecab_node_beta - Get the backward log probability.
* double mecab_node_beta(resource mecab_node node)
* double MeCab_Node::getBeta(void)
|
* @param resource mecab_node $node The node of the source string.
* @return double The backward log probability of the node.
|
mecab_node_prob - Get the marginal probability.
* double mecab_node_prob(resource mecab_node node)
* double MeCab_Node::getProb(void)
|
* @param resource mecab_node $node The node of the source string.
* @return double The marginal probability of the node.
|
mecab_node_wcost - Get the word arising cost.
* int mecab_node_wcost(resource mecab_node node)
* int MeCab_Node::getWCost(void)
|
* @param resource mecab_node $node The node of the source string.
* @return int The word arising cost of the node.
|
mecab_node_cost - Get the cumulative cost.
* int mecab_node_cost(resource mecab_node node)
* int MeCab_Node::getCost(void)
|
* @param resource mecab_node $node The node of the source string.
* @return int The cumulative cost of the node.
|
mecab_path_rnext - Get the rnext path.
* resource mecab_path mecab_path_rnext(resource mecab_path path)
* object MeCab_Path MeCab_Path::getRNext(void)
|
* @param resource mecab_path $path The path of the source string.
* @return resource mecab_path The rnext path.
* If the given path is the first one, returns FALSE.
|
mecab_path_lnext - Get the lnext path.
* resource mecab_path mecab_path_lnext(resource mecab_path path)
* object MeCab_Path MeCab_Path::getLNext(void)
|
* @param resource mecab_path $path The path of the source string.
* @return resource mecab_path The lnext path.
* If the given path is the last one, returns FALSE.
|
mecab_path_rnode - Get the rnode.
* resource mecab_node mecab_path_rnode(resource mecab_path path)
* object MeCab_Node MeCab_Path::getRNode(void)
|
* @param resource mecab_path $path The path of the source string.
* @return resource mecab_node The next path which has same end point as the given path.
* If there is no `rnode' path, returns false.
|
mecab_path_lnode - Get the lnode.
* resource mecab_node mecab_path_lnode(resource mecab_path path)
* object MeCab_Node MeCab_Path::getLNode(void)
|
* @param resource mecab_path $path The path of the source string.
* @return resource mecab_node The next path which has same beggining point as the given one.
* If there is no `lnode' path, returns false.
|
mecab_path_prob - Get the marginal probability.
* double mecab_path_prob(resource mecab_path path)
* double MeCab_Path::getProb(void)
|
* @param resource mecab_path $path The path of the source string.
* @return double The marginal probability of the path.
|
mecab_path_cost - Get the cumulative cost.
* int mecab_path_cost(resource mecab_path path)
* int MeCab_Path::getCost(void)
|
* @param resource mecab_path $path The path of the source string.
* @return int The cumulative cost of the path.
|