lucy-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mar...@apache.org
Subject svn commit: r932815 - in /lucene/lucy/trunk/core/Lucy: Analysis/Analyzer.bp Analysis/Analyzer.c Test/Analysis/ Test/Analysis/DummyAnalyzer.bp Test/Analysis/DummyAnalyzer.c
Date Sun, 11 Apr 2010 00:01:51 GMT
Author: marvin
Date: Sun Apr 11 00:01:51 2010
New Revision: 932815

URL: http://svn.apache.org/viewvc?rev=932815&view=rev
Log:
Add a stub class for Analyzer and the test-only subclass DummyAnalyzer.
(LUCY-102)

Added:
    lucene/lucy/trunk/core/Lucy/Analysis/Analyzer.bp   (with props)
    lucene/lucy/trunk/core/Lucy/Analysis/Analyzer.c   (with props)
    lucene/lucy/trunk/core/Lucy/Test/Analysis/
    lucene/lucy/trunk/core/Lucy/Test/Analysis/DummyAnalyzer.bp   (with props)
    lucene/lucy/trunk/core/Lucy/Test/Analysis/DummyAnalyzer.c   (with props)

Added: lucene/lucy/trunk/core/Lucy/Analysis/Analyzer.bp
URL: http://svn.apache.org/viewvc/lucene/lucy/trunk/core/Lucy/Analysis/Analyzer.bp?rev=932815&view=auto
==============================================================================
--- lucene/lucy/trunk/core/Lucy/Analysis/Analyzer.bp (added)
+++ lucene/lucy/trunk/core/Lucy/Analysis/Analyzer.bp Sun Apr 11 00:01:51 2010
@@ -0,0 +1,32 @@
+parcel Lucy;
+
+/** Tokenize/modify/filter text.
+ *
+ * An Analyzer is a filter which processes text, transforming it from one form
+ * into another.  For instance, an analyzer might break up a long text into
+ * smaller pieces (L<Tokenizer|Lucy::Analysis::Tokenizer>), or it might
+ * perform case folding to facilitate case-insensitive search
+ * (L<CaseFolder|Lucy::Analysis::CaseFolder>).
+ */
+abstract class Lucy::Analysis::Analyzer 
+    extends Lucy::Object::Obj : dumpable {
+
+    public inert Analyzer* 
+    init(Analyzer *self);
+}
+
+/* Copyright 2010 The Apache Software Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+

Propchange: lucene/lucy/trunk/core/Lucy/Analysis/Analyzer.bp
------------------------------------------------------------------------------
    svn:eol-style = native

Added: lucene/lucy/trunk/core/Lucy/Analysis/Analyzer.c
URL: http://svn.apache.org/viewvc/lucene/lucy/trunk/core/Lucy/Analysis/Analyzer.c?rev=932815&view=auto
==============================================================================
--- lucene/lucy/trunk/core/Lucy/Analysis/Analyzer.c (added)
+++ lucene/lucy/trunk/core/Lucy/Analysis/Analyzer.c Sun Apr 11 00:01:51 2010
@@ -0,0 +1,27 @@
+#define C_LUCY_ANALYZER
+#include "Lucy/Util/ToolSet.h"
+
+#include "Lucy/Analysis/Analyzer.h"
+
+Analyzer*
+Analyzer_init(Analyzer *self)
+{
+    ABSTRACT_CLASS_CHECK(self, ANALYZER);
+    return self;
+}
+
+/* Copyright 2010 The Apache Software Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+

Propchange: lucene/lucy/trunk/core/Lucy/Analysis/Analyzer.c
------------------------------------------------------------------------------
    svn:eol-style = native

Added: lucene/lucy/trunk/core/Lucy/Test/Analysis/DummyAnalyzer.bp
URL: http://svn.apache.org/viewvc/lucene/lucy/trunk/core/Lucy/Test/Analysis/DummyAnalyzer.bp?rev=932815&view=auto
==============================================================================
--- lucene/lucy/trunk/core/Lucy/Test/Analysis/DummyAnalyzer.bp (added)
+++ lucene/lucy/trunk/core/Lucy/Test/Analysis/DummyAnalyzer.bp Sun Apr 11 00:01:51 2010
@@ -0,0 +1,34 @@
+parcel Lucy;
+
+/** Test-only subclass of Analyzer.
+ */
+class Lucy::Test::Analysis::DummyAnalyzer 
+    extends Lucy::Analysis::Analyzer : dumpable {
+
+    int32_t id;
+
+    inert incremented DummyAnalyzer* 
+    new(int32_t id);
+
+    inert DummyAnalyzer* 
+    init(DummyAnalyzer *self, int32_t id);
+
+    public bool_t
+    Equals(DummyAnalyzer *self, Obj *other);
+}
+
+/* Copyright 2010 The Apache Software Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+

Propchange: lucene/lucy/trunk/core/Lucy/Test/Analysis/DummyAnalyzer.bp
------------------------------------------------------------------------------
    svn:eol-style = native

Added: lucene/lucy/trunk/core/Lucy/Test/Analysis/DummyAnalyzer.c
URL: http://svn.apache.org/viewvc/lucene/lucy/trunk/core/Lucy/Test/Analysis/DummyAnalyzer.c?rev=932815&view=auto
==============================================================================
--- lucene/lucy/trunk/core/Lucy/Test/Analysis/DummyAnalyzer.c (added)
+++ lucene/lucy/trunk/core/Lucy/Test/Analysis/DummyAnalyzer.c Sun Apr 11 00:01:51 2010
@@ -0,0 +1,44 @@
+#define C_LUCY_DUMMYANALYZER
+#include "Lucy/Util/ToolSet.h"
+
+#include "Lucy/Test/Analysis/DummyAnalyzer.h"
+
+DummyAnalyzer*
+DummyAnalyzer_new(int32_t id)
+{
+    DummyAnalyzer *self = (DummyAnalyzer*)VTable_Make_Obj(DUMMYANALYZER);
+    return DummyAnalyzer_init(self, id);
+}
+
+DummyAnalyzer*
+DummyAnalyzer_init(DummyAnalyzer *self, int32_t id)
+{
+    Analyzer_init((Analyzer*)self);
+    self->id = id;
+    return self;
+}
+
+bool_t
+DummyAnalyzer_equals(DummyAnalyzer *self, Obj *other)
+{
+    DummyAnalyzer *evil_twin = (DummyAnalyzer*)other;
+    if (!Obj_Is_A(other, DUMMYANALYZER)) return false;
+    if (self->id != evil_twin->id) return false;
+    return true;
+}
+
+/* Copyright 2010 The Apache Software Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+

Propchange: lucene/lucy/trunk/core/Lucy/Test/Analysis/DummyAnalyzer.c
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message