summaryrefslogtreecommitdiff
path: root/contrib/tsearch2
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/tsearch2')
-rw-r--r--contrib/tsearch2/docs/tsearch-V2-intro.html24
-rw-r--r--contrib/tsearch2/docs/tsearch2-guide.html2
-rw-r--r--contrib/tsearch2/ispell/spell.c2
-rw-r--r--contrib/tsearch2/prs_dcfg.c10
-rw-r--r--contrib/tsearch2/query.c2
-rw-r--r--contrib/tsearch2/query_cleanup.c2
-rw-r--r--contrib/tsearch2/query_gist.c4
-rw-r--r--contrib/tsearch2/query_rewrite.c2
-rw-r--r--contrib/tsearch2/ts_cfg.c10
-rw-r--r--contrib/tsearch2/ts_stat.c2
-rw-r--r--contrib/tsearch2/tsvector.c2
-rw-r--r--contrib/tsearch2/wparser.c22
12 files changed, 42 insertions, 42 deletions
diff --git a/contrib/tsearch2/docs/tsearch-V2-intro.html b/contrib/tsearch2/docs/tsearch-V2-intro.html
index fb36f2c28a7..b9cb80574e3 100644
--- a/contrib/tsearch2/docs/tsearch-V2-intro.html
+++ b/contrib/tsearch2/docs/tsearch-V2-intro.html
@@ -322,7 +322,7 @@ result, and a NOTICE like this:</p>
<pre>
SELECT to_tsquery('default', 'a|is&amp;not|!the');
NOTICE: Query contains only stopword(s)
- or doesn't contain lexem(s), ignored
+ or doesn't contain lexeme(s), ignored
to_tsquery
-----------
(1 row)
@@ -730,7 +730,7 @@ the ISpell sources, and you can use them to integrate into
tsearch2. This is not complicated, but is not very obvious to begin
with. The tsearch2 ISpell interface needs only the listing of
dictionary words, it will parse and load those words, and use the
-ISpell dictionary for lexem processing.</p>
+ISpell dictionary for lexeme processing.</p>
<p>I found the ISPell make system to be very finicky. Their
documentation actually states this to be the case. So I just did
@@ -769,7 +769,7 @@ to the stored procedures from the row where the dict_name =
WHERE dict_name = 'ispell_template');
</pre>
<p>Now that we have a dictionary we can specify it's use in a query
-to get a lexem. For this we will use the lexize function. The
+to get a lexeme. For this we will use the lexize function. The
lexize function takes the name of the dictionary to use as an
argument. Just as the other tsearch2 functions operate. You will
need to stop your psql session and start it again in order for this
@@ -788,8 +788,8 @@ dictionary.</p>
<pre>
SELECT set_curdict('en_ispell');
</pre>
-<p>Lexize is meant to turn a word into a lexem. It is possible to
-receive more than one lexem returned for a single word.</p>
+<p>Lexize is meant to turn a word into a lexeme. It is possible to
+receive more than one lexeme returned for a single word.</p>
<pre>
SELECT lexize('en_ispell', 'conditionally');
lexize
@@ -798,7 +798,7 @@ receive more than one lexem returned for a single word.</p>
(1 row)
</pre>
<p>The lexize function is not meant to take a full string as an
-argument to return lexems for. If you passed in an entire sentence,
+argument to return lexemes for. If you passed in an entire sentence,
it attempts to find that entire sentence in the dictionary. Since
the dictionary contains only words, you will receive an empty
result set back.</p>
@@ -809,7 +809,7 @@ result set back.</p>
(1 row)
-If you parse a lexem from a word not in the dictionary, then you will receive an empty result. This makes sense because the word "tsearch" is not in the english dictionary. You can create your own additions to the dictionary if you like. This may be useful for scientific or technical glossaries that need to be indexed. SELECT lexize('en_ispell', 'tsearch'); lexize -------- (1 row)
+If you parse a lexeme from a word not in the dictionary, then you will receive an empty result. This makes sense because the word "tsearch" is not in the english dictionary. You can create your own additions to the dictionary if you like. This may be useful for scientific or technical glossaries that need to be indexed. SELECT lexize('en_ispell', 'tsearch'); lexize -------- (1 row)
</pre>
<p>This is not to say that tsearch will be ignored when adding text
@@ -830,11 +830,11 @@ concerned with forcing the use of the ISpell dictionary.</p>
VALUES ('default_english', 'lword', '{en_ispell,en_stem}');
</pre>
<p>We have just inserted 3 records to the configuration mapping,
-specifying that the lexem types for "lhword, lpart_hword and lword"
+specifying that the lexeme types for "lhword, lpart_hword and lword"
are to be stemmed using the 'en_ispell' dictionary we added into
pg_ts_dict, when using the configuration ' default_english' which
we added to pg_ts_cfg.</p>
-<p>There are several other lexem types used that we do not need to
+<p>There are several other lexeme types used that we do not need to
specify as using the ISpell dictionary. We can simply insert values
using the 'simple' stemming process dictionary.</p>
<pre>
@@ -889,10 +889,10 @@ configuration to be our default for en_US locale.</p>
(1 row)
</pre>
<p>Notice here that words like "tsearch" are still parsed and
-indexed in the tsvector column. There is a lexem returned for the
+indexed in the tsvector column. There is a lexeme returned for the
word becuase in the configuration mapping table, we specify words
to be used from the 'en_ispell' dictionary first, but as a fallback
-to use the 'en_stem' dictionary. Therefore a lexem is not returned
+to use the 'en_stem' dictionary. Therefore a lexeme is not returned
from en_ispell, but is returned from en_stem, and added to the
tsvector.</p>
<pre>
@@ -905,7 +905,7 @@ tsvector.</p>
<p>Notice in this last example I added the word "computer" to the
text to be converted into a tsvector. Because we have setup our
default configuration to use the ISpell english dictionary, the
-words are lexized, and computer returns 2 lexems at the same
+words are lexized, and computer returns 2 lexemes at the same
position. 'compute':7 and 'computer':7 are now both indexed for the
word computer.</p>
<p>You can create additional dictionary lists, or use the extra
diff --git a/contrib/tsearch2/docs/tsearch2-guide.html b/contrib/tsearch2/docs/tsearch2-guide.html
index 2529480a53a..5540e5d323c 100644
--- a/contrib/tsearch2/docs/tsearch2-guide.html
+++ b/contrib/tsearch2/docs/tsearch2-guide.html
@@ -251,7 +251,7 @@ and give you an error to prevent this mistake:
<pre>
=# <b>SELECT to_tsquery('the')</b>
-NOTICE: Query contains only stopword(s) or doesn't contain lexem(s), ignored
+NOTICE: Query contains only stopword(s) or doesn't contain lexeme(s), ignored
to_tsquery
------------
diff --git a/contrib/tsearch2/ispell/spell.c b/contrib/tsearch2/ispell/spell.c
index 1960f9510bd..223ae4a9ada 100644
--- a/contrib/tsearch2/ispell/spell.c
+++ b/contrib/tsearch2/ispell/spell.c
@@ -869,7 +869,7 @@ CheckAffix(const char *word, size_t len, AFFIX * Affix, char flagflags, char *ne
char regerrstr[ERRSTRSIZE];
pg_regerror(err, &(Affix->reg.regex), regerrstr, ERRSTRSIZE);
- elog(ERROR, "Regex error in '%s': %s", Affix->mask, regerrstr);
+ elog(ERROR, "regex error in '%s': %s", Affix->mask, regerrstr);
}
Affix->compile = 0;
}
diff --git a/contrib/tsearch2/prs_dcfg.c b/contrib/tsearch2/prs_dcfg.c
index c54ca11803c..42fd6712e6d 100644
--- a/contrib/tsearch2/prs_dcfg.c
+++ b/contrib/tsearch2/prs_dcfg.c
@@ -74,7 +74,7 @@ parse_cfgdict(text *in, Map ** m)
ereport(ERROR,
(errcode(ERRCODE_SYNTAX_ERROR),
errmsg("syntax error"),
- errdetail("Syntax error in position %d",
+ errdetail("Syntax error in position %d.",
(int) (ptr - VARDATA(in)))));
}
else if (state == CS_INKEY)
@@ -93,7 +93,7 @@ parse_cfgdict(text *in, Map ** m)
ereport(ERROR,
(errcode(ERRCODE_SYNTAX_ERROR),
errmsg("syntax error"),
- errdetail("Syntax error in position %d",
+ errdetail("Syntax error in position %d.",
(int) (ptr - VARDATA(in)))));
}
else if (state == CS_WAITEQ)
@@ -104,7 +104,7 @@ parse_cfgdict(text *in, Map ** m)
ereport(ERROR,
(errcode(ERRCODE_SYNTAX_ERROR),
errmsg("syntax error"),
- errdetail("Syntax error in position %d",
+ errdetail("Syntax error in position %d.",
(int) (ptr - VARDATA(in)))));
}
else if (state == CS_WAITVALUE)
@@ -150,7 +150,7 @@ parse_cfgdict(text *in, Map ** m)
ereport(ERROR,
(errcode(ERRCODE_SYNTAX_ERROR),
errmsg("syntax error"),
- errdetail("Syntax error in position %d",
+ errdetail("Syntax error in position %d.",
(int) (ptr - VARDATA(in)))));
}
else if (state == CS_INESC)
@@ -161,7 +161,7 @@ parse_cfgdict(text *in, Map ** m)
ereport(ERROR,
(errcode(ERRCODE_SYNTAX_ERROR),
errmsg("bad parser state"),
- errdetail("%d at position %d",
+ errdetail("%d at position %d.",
state, (int) (ptr - VARDATA(in)))));
ptr+=pg_mblen(ptr);
}
diff --git a/contrib/tsearch2/query.c b/contrib/tsearch2/query.c
index e6285fd9d2e..9be5f451fa8 100644
--- a/contrib/tsearch2/query.c
+++ b/contrib/tsearch2/query.c
@@ -643,7 +643,7 @@ static QUERYTYPE *
pfree(state.valstate.word);
if (!state.num)
{
- elog(NOTICE, "Query doesn't contain lexem(s)");
+ elog(NOTICE, "query doesn't contain lexeme(s)");
query = (QUERYTYPE *) palloc(HDRSIZEQT);
query->len = HDRSIZEQT;
query->size = 0;
diff --git a/contrib/tsearch2/query_cleanup.c b/contrib/tsearch2/query_cleanup.c
index f56f7fbea3e..08d3ff219b5 100644
--- a/contrib/tsearch2/query_cleanup.c
+++ b/contrib/tsearch2/query_cleanup.c
@@ -246,7 +246,7 @@ clean_fakeval_v2(ITEM * ptr, int4 *len)
resroot = clean_fakeval_intree(root, &result);
if (result != V_UNKNOWN)
{
- elog(NOTICE, "Query contains only stopword(s) or doesn't contain lexem(s), ignored");
+ elog(NOTICE, "query contains only stopword(s) or doesn't contain lexeme(s), ignored");
*len = 0;
return NULL;
}
diff --git a/contrib/tsearch2/query_gist.c b/contrib/tsearch2/query_gist.c
index b3a5b501116..5941be3a55b 100644
--- a/contrib/tsearch2/query_gist.c
+++ b/contrib/tsearch2/query_gist.c
@@ -138,14 +138,14 @@ Datum gtsq_picksplit(PG_FUNCTION_ARGS);
Datum
gtsq_in(PG_FUNCTION_ARGS)
{
- elog(ERROR, "Not implemented");
+ elog(ERROR, "not implemented");
PG_RETURN_DATUM(0);
}
Datum
gtsq_out(PG_FUNCTION_ARGS)
{
- elog(ERROR, "Not implemented");
+ elog(ERROR, "not implemented");
PG_RETURN_DATUM(0);
}
diff --git a/contrib/tsearch2/query_rewrite.c b/contrib/tsearch2/query_rewrite.c
index f1faaf87786..1c3121aa850 100644
--- a/contrib/tsearch2/query_rewrite.c
+++ b/contrib/tsearch2/query_rewrite.c
@@ -220,7 +220,7 @@ get_tsq_Oid(void)
if (SPI_processed < 0)
/* internal error */
- elog(ERROR, "There is no tsvector type");
+ elog(ERROR, "there is no tsvector type");
tsqOid = DatumGetObjectId(SPI_getbinval(SPI_tuptable->vals[0], SPI_tuptable->tupdesc, 1, &isnull));
if (tsqOid == InvalidOid)
/* internal error */
diff --git a/contrib/tsearch2/ts_cfg.c b/contrib/tsearch2/ts_cfg.c
index 50a355e464a..3bc39a87378 100644
--- a/contrib/tsearch2/ts_cfg.c
+++ b/contrib/tsearch2/ts_cfg.c
@@ -318,7 +318,7 @@ parsetext_v2(TSCfgInfo * cfg, PRSTEXT * prs, char *buf, int4 buflen)
#endif
}
- if (type >= cfg->len) /* skip this type of lexem */
+ if (type >= cfg->len) /* skip this type of lexeme */
continue;
for (i = 0; i < cfg->map[type].len; i++)
@@ -335,7 +335,7 @@ parsetext_v2(TSCfgInfo * cfg, PRSTEXT * prs, char *buf, int4 buflen)
PointerGetDatum(lenlemm)
)
);
- if (!norms) /* dictionary doesn't know this lexem */
+ if (!norms) /* dictionary doesn't know this lexeme */
continue;
prs->pos++; /* set pos */
@@ -357,7 +357,7 @@ parsetext_v2(TSCfgInfo * cfg, PRSTEXT * prs, char *buf, int4 buflen)
prs->curwords++;
}
pfree(norms);
- break; /* lexem already normalized or is stop word */
+ break; /* lexeme already normalized or is stop word */
}
}
@@ -472,7 +472,7 @@ hlparsetext(TSCfgInfo * cfg, HLPRSTEXT * prs, QUERYTYPE * query, char *buf, int4
PointerGetDatum(lenlemm)
)
);
- if (!norms) /* dictionary doesn't know this lexem */
+ if (!norms) /* dictionary doesn't know this lexeme */
continue;
while (ptr->lexeme)
@@ -482,7 +482,7 @@ hlparsetext(TSCfgInfo * cfg, HLPRSTEXT * prs, QUERYTYPE * query, char *buf, int4
ptr++;
}
pfree(norms);
- break; /* lexem already normalized or is stop word */
+ break; /* lexeme already normalized or is stop word */
}
}
diff --git a/contrib/tsearch2/ts_stat.c b/contrib/tsearch2/ts_stat.c
index ae9575b3532..3a90fe5a192 100644
--- a/contrib/tsearch2/ts_stat.c
+++ b/contrib/tsearch2/ts_stat.c
@@ -426,7 +426,7 @@ get_ti_Oid(void)
if (SPI_processed < 1)
/* internal error */
- elog(ERROR, "There is no tsvector type");
+ elog(ERROR, "there is no tsvector type");
tiOid = DatumGetObjectId(SPI_getbinval(SPI_tuptable->vals[0], SPI_tuptable->tupdesc, 1, &isnull));
if (tiOid == InvalidOid)
/* internal error */
diff --git a/contrib/tsearch2/tsvector.c b/contrib/tsearch2/tsvector.c
index dd895ff38ab..0f369bdcb7e 100644
--- a/contrib/tsearch2/tsvector.c
+++ b/contrib/tsearch2/tsvector.c
@@ -1,7 +1,7 @@
/*
* In/Out definitions for tsvector type
* Internal structure:
- * string of values, array of position lexem in string and it's length
+ * string of values, array of position lexeme in string and it's length
* Teodor Sigaev <teodor@sigaev.ru>
*/
#include "postgres.h"
diff --git a/contrib/tsearch2/wparser.c b/contrib/tsearch2/wparser.c
index 725020e23de..eb990817301 100644
--- a/contrib/tsearch2/wparser.c
+++ b/contrib/tsearch2/wparser.c
@@ -342,14 +342,14 @@ set_curprs_byname(PG_FUNCTION_ARGS)
typedef struct
{
int type;
- char *lexem;
-} LexemEntry;
+ char *lexeme;
+} LexemeEntry;
typedef struct
{
- int cur;
- int len;
- LexemEntry *list;
+ int cur;
+ int len;
+ LexemeEntry *list;
} PrsStorage;
@@ -370,7 +370,7 @@ prs_setup_firstcall(FunctionCallInfo fcinfo, FuncCallContext *funcctx,
st = (PrsStorage *) palloc(sizeof(PrsStorage));
st->cur = 0;
st->len = 16;
- st->list = (LexemEntry *) palloc(sizeof(LexemEntry) * st->len);
+ st->list = (LexemeEntry *) palloc(sizeof(LexemeEntry) * st->len);
prs->prs = (void *) DatumGetPointer(
FunctionCall2(
@@ -390,11 +390,11 @@ prs_setup_firstcall(FunctionCallInfo fcinfo, FuncCallContext *funcctx,
if (st->cur >= st->len)
{
st->len = 2 * st->len;
- st->list = (LexemEntry *) repalloc(st->list, sizeof(LexemEntry) * st->len);
+ st->list = (LexemeEntry *) repalloc(st->list, sizeof(LexemeEntry) * st->len);
}
- st->list[st->cur].lexem = palloc(llen + 1);
- memcpy(st->list[st->cur].lexem, lex, llen);
- st->list[st->cur].lexem[llen] = '\0';
+ st->list[st->cur].lexeme = palloc(llen + 1);
+ memcpy(st->list[st->cur].lexeme, lex, llen);
+ st->list[st->cur].lexeme[llen] = '\0';
st->list[st->cur].type = type;
st->cur++;
}
@@ -430,7 +430,7 @@ prs_process_call(FuncCallContext *funcctx)
values[0] = tid;
sprintf(tid, "%d", st->list[st->cur].type);
- values[1] = st->list[st->cur].lexem;
+ values[1] = st->list[st->cur].lexeme;
tuple = BuildTupleFromCStrings(funcctx->attinmeta, values);
result = HeapTupleGetDatum(tuple);