[ 
https://issues.apache.org/jira/browse/JENA-1506?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16400987#comment-16400987
 ] 

ASF GitHub Bot commented on JENA-1506:
--------------------------------------

GitHub user xristy opened a pull request:

    https://github.com/apache/jena/pull/385

    defined filters and tokenizers for ConfigurableAnalyzer

    This PR implements 
[JENA-1506](https://issues.apache.org/jira/browse/JENA-1506). See the issue for 
details.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/BuddhistDigitalResourceCenter/jena 
JENA-1506-PR

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/jena/pull/385.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #385
    
----
commit 795b9eb7cb45999c1d884bcd84c83896a498ed87
Author: Chris Tomlinson <ct@...>
Date:   2018-03-15T19:12:53Z

    Merged JENA-1506-definedFilters

----


> Add configurable filters and tokenizers
> ---------------------------------------
>
>                 Key: JENA-1506
>                 URL: https://issues.apache.org/jira/browse/JENA-1506
>             Project: Apache Jena
>          Issue Type: New Feature
>          Components: Text
>    Affects Versions: Jena 3.7.0
>            Reporter: Code Ferret
>            Priority: Major
>
> In support of [Jena-1488|https://issues.apache.org/jira/browse/JENA-1488], 
> this issue proposes to add a feature to allow including defined filters and 
> tokenizers, similar to {{DefinedAnalyzer}}, for the {{ConfigurableAnalyzer}}, 
> allowing configurable arguments such as the {{excludeChars}}. I've looked at 
> {{ConfigurableAnalyzer}} and its assembler and it should be straightforward.
> I would add tokenizer and filter definitions to {{TextIndexLucene}} similar 
> to the support for adding analyzers:
> {code:java}
>     text:defineFilters (
>         [ text:defineFilter <#foo> ; 
>           text:filter [ 
>             a text:GenericFilter ;
>             text:class "fi.finto.FoldingFilter" ;
>             text:params (
>                 [ text:paramName "excludeChars" ;
>                   text:paramType text:TypeString ; 
>                   text:paramValue "whatevercharstoexclude" ]
>                 )
>             ] ; 
>           ]
>       )
> {code}
> {{GenericFilterAssembler}} and {{GenericTokenizerAssmbler}} would make use of 
> much of the code in {{GenericAnalyzerAssembler}}. The changes to 
> {{ConfigurableAnalyzer}} and {{ConfigurableAnalyzerAssembler}} are 
> straightforward and mostly involve retaining the resource URI rather than 
> extracting the localName.
> Such an addition will make it easy to create new tokenizers and filters that 
> could be dropped in by just adding the classes onto the jena/fuseki classpath 
> or by referring to ones already included in Jena (via Lucene or otherwise) 
> and putting the appropriate assembler bits in the configuration.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to