Navigation Menu

Skip to content

Commit

Permalink
add --with-default-tokenizer configure option to specify the default …
Browse files Browse the repository at this point in the history
…tokenizer.
  • Loading branch information
kou committed Sep 25, 2011
1 parent 65d608a commit 7f0f53b
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 2 deletions.
13 changes: 13 additions & 0 deletions configure.ac
Expand Up @@ -167,6 +167,19 @@ AC_SUBST(plugindir)
CONFIG_OPTION_MECAB
CONFIG_OPTION_GROONGA

AC_ARG_WITH(default_tokenizer,
[AC_HELP_STRING([--with-default-tokenizer=TOKENIZER],
[specify the default tokenizer like
--with-default-tokenizer=TokenMecab.
(default: TokenBigram)])],
[default_tokenizer=$withval],
[default_tokenizer=no])
if test x"$default_tokenizer" != x"no"; then
AC_DEFINE_UNQUOTED(MRN_TOKENIZER_DEFAULT,
"$default_tokenizer",
"specified default tokenizer")
fi

# check Cutter with GLib support if available
REQUIRED_MINIMUM_CUTTER_VERSION=1.1.3
m4_ifdef([AC_CHECK_GCUTTER], [
Expand Down
5 changes: 4 additions & 1 deletion mrn_sys.c
Expand Up @@ -18,11 +18,14 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/

#ifdef HAVE_CONFIG_H
# include "config.h"
#endif

#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "mrn_sys.h"
#include "config.h"

int mrn_hash_put(grn_ctx *ctx, grn_hash *hash, const char *key, void *value)
{
Expand Down
4 changes: 3 additions & 1 deletion mrn_sys.h
Expand Up @@ -36,7 +36,9 @@
#define MRN_PAT_SUFFIX "_pat"
#define MRN_COLUMN_NAME_ID "_id"
#define MRN_COLUMN_NAME_SCORE "_score"
#define MRN_TOKENIZER_DEFAULT "TokenBigram"
#ifndef MRN_TOKENIZER_DEFAULT
# define MRN_TOKENIZER_DEFAULT "TokenBigram"
#endif

/* functions */
int mrn_hash_put(grn_ctx *ctx, grn_hash *hash, const char *key, void *value);
Expand Down

0 comments on commit 7f0f53b

Please sign in to comment.