2009-03-19 06:51:55 -04:00
|
|
|
<?xml version="1.0"?>
|
|
|
|
|
|
|
|
<!--
|
|
|
|
Licensed to the Apache Software Foundation (ASF) under one or more
|
|
|
|
contributor license agreements. See the NOTICE file distributed with
|
|
|
|
this work for additional information regarding copyright ownership.
|
|
|
|
The ASF licenses this file to You 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.
|
|
|
|
-->
|
|
|
|
|
2010-05-20 06:46:00 -04:00
|
|
|
<project name="analyzers-icu" default="default">
|
2009-03-19 06:51:55 -04:00
|
|
|
|
|
|
|
<description>
|
2009-12-09 07:08:06 -05:00
|
|
|
Provides integration with ICU (International Components for Unicode) for
|
|
|
|
stronger Unicode and internationalization support.
|
2009-03-19 06:51:55 -04:00
|
|
|
</description>
|
|
|
|
|
2010-05-20 06:46:00 -04:00
|
|
|
<property name="build.dir" location="../build/icu" />
|
|
|
|
<property name="dist.dir" location="../dist/icu" />
|
2009-03-19 06:51:55 -04:00
|
|
|
|
|
|
|
<path id="additional.dependencies">
|
|
|
|
<fileset dir="lib" includes="icu4j-*.jar"/>
|
|
|
|
</path>
|
|
|
|
|
|
|
|
<pathconvert property="project.classpath"
|
|
|
|
targetos="unix"
|
|
|
|
refid="additional.dependencies"
|
|
|
|
/>
|
|
|
|
|
2010-05-20 06:46:00 -04:00
|
|
|
<import file="../../../lucene/contrib/contrib-build.xml"/>
|
2009-03-19 06:51:55 -04:00
|
|
|
|
2010-05-25 16:16:44 -04:00
|
|
|
<path id="classpath">
|
|
|
|
<pathelement path="${analyzers-common.jar}"/>
|
|
|
|
<path refid="base.classpath"/>
|
|
|
|
</path>
|
|
|
|
|
2011-07-28 00:02:09 -04:00
|
|
|
<target name="compile-core" depends="jar-analyzers-common, common.compile-core" />
|
2010-05-25 16:16:44 -04:00
|
|
|
|
2010-04-22 04:47:49 -04:00
|
|
|
<property name="gennorm2.src.dir" value="src/data/utr30"/>
|
|
|
|
<property name="gennorm2.src.files"
|
|
|
|
value="nfkc.txt nfkc_cf.txt BasicFoldings.txt DiacriticFolding.txt DingbatFolding.txt HanRadicalFolding.txt NativeDigitFolding.txt"/>
|
2010-08-30 21:33:02 -04:00
|
|
|
<property name="gennorm2.tmp" value="${build.dir}/gennorm2/utr30.tmp"/>
|
2010-04-22 04:47:49 -04:00
|
|
|
<property name="gennorm2.dst" value="src/resources/org/apache/lucene/analysis/icu/utr30.nrm"/>
|
|
|
|
<target name="gennorm2">
|
2010-08-30 21:33:02 -04:00
|
|
|
<echo>Note that the gennorm2 and icupkg tools must be on your PATH. These tools
|
|
|
|
are part of the ICU4C package. See http://site.icu-project.org/ </echo>
|
|
|
|
<mkdir dir="${build.dir}/gennorm2"/>
|
2010-04-22 04:47:49 -04:00
|
|
|
<exec executable="gennorm2" failonerror="true">
|
2010-05-03 09:20:09 -04:00
|
|
|
<arg value="-v"/>
|
|
|
|
<arg value="-s"/>
|
|
|
|
<arg value="${gennorm2.src.dir}"/>
|
2010-08-30 21:33:02 -04:00
|
|
|
<arg line="${gennorm2.src.files}"/>
|
2010-05-03 09:20:09 -04:00
|
|
|
<arg value="-o"/>
|
2010-08-30 21:33:02 -04:00
|
|
|
<arg value="${gennorm2.tmp}"/>
|
|
|
|
</exec>
|
|
|
|
<!-- now convert binary file to big-endian -->
|
|
|
|
<exec executable="icupkg" failonerror="true">
|
|
|
|
<arg value="-tb"/>
|
|
|
|
<arg value="${gennorm2.tmp}"/>
|
2010-05-03 09:20:09 -04:00
|
|
|
<arg value="${gennorm2.dst}"/>
|
2010-04-22 04:47:49 -04:00
|
|
|
</exec>
|
2010-08-30 21:33:02 -04:00
|
|
|
<delete file="${gennorm2.tmp}"/>
|
2010-04-22 04:47:49 -04:00
|
|
|
</target>
|
2010-05-03 09:20:09 -04:00
|
|
|
|
|
|
|
<property name="rbbi.src.dir" location="src/data/uax29"/>
|
|
|
|
<property name="rbbi.dst.dir" location="src/resources/org/apache/lucene/analysis/icu/segmentation"/>
|
|
|
|
|
|
|
|
<target name="genrbbi" depends="compile-tools">
|
|
|
|
<mkdir dir="${rbbi.dst.dir}"/>
|
|
|
|
<java
|
|
|
|
classname="org.apache.lucene.analysis.icu.RBBIRuleCompiler"
|
|
|
|
dir="."
|
|
|
|
fork="true"
|
|
|
|
failonerror="true">
|
|
|
|
<classpath>
|
|
|
|
<path refid="additional.dependencies"/>
|
|
|
|
<pathelement location="${build.dir}/classes/tools"/>
|
|
|
|
</classpath>
|
2012-01-13 06:36:50 -05:00
|
|
|
<assertions>
|
|
|
|
<enable package="org.apache.lucene"/>
|
|
|
|
</assertions>
|
2010-05-03 09:20:09 -04:00
|
|
|
<arg value="${rbbi.src.dir}"/>
|
|
|
|
<arg value="${rbbi.dst.dir}"/>
|
|
|
|
</java>
|
|
|
|
</target>
|
|
|
|
|
2011-01-06 08:51:10 -05:00
|
|
|
<property name="uax29.supp.macros.output.file"
|
|
|
|
location="../common/src/java/org/apache/lucene/analysis/standard/SUPPLEMENTARY.jflex-macro"/>
|
|
|
|
|
|
|
|
<target name="gen-uax29-supp-macros" depends="compile-tools">
|
|
|
|
<java
|
|
|
|
classname="org.apache.lucene.analysis.icu.GenerateJFlexSupplementaryMacros"
|
|
|
|
dir="."
|
|
|
|
fork="true"
|
|
|
|
failonerror="true"
|
|
|
|
output="${uax29.supp.macros.output.file}">
|
|
|
|
<classpath>
|
|
|
|
<path refid="additional.dependencies"/>
|
|
|
|
<pathelement location="${build.dir}/classes/tools"/>
|
|
|
|
</classpath>
|
2012-01-13 06:36:50 -05:00
|
|
|
<assertions>
|
|
|
|
<enable package="org.apache.lucene"/>
|
|
|
|
</assertions>
|
2011-01-06 08:51:10 -05:00
|
|
|
</java>
|
|
|
|
</target>
|
2012-01-22 00:20:46 -05:00
|
|
|
|
|
|
|
<property name="html.strip.charfilter.supp.macros.output.file"
|
|
|
|
location="../common/src/java/org/apache/lucene/analysis/charfilter/HTMLStripCharFilter.SUPPLEMENTARY.jflex-macro"/>
|
|
|
|
|
|
|
|
<target name="gen-html-strip-charfilter-supp-macros" depends="compile-tools">
|
|
|
|
<java
|
|
|
|
classname="org.apache.lucene.analysis.icu.GenerateHTMLStripCharFilterSupplementaryMacros"
|
|
|
|
dir="."
|
|
|
|
fork="true"
|
|
|
|
failonerror="true"
|
|
|
|
output="${html.strip.charfilter.supp.macros.output.file}">
|
|
|
|
<classpath>
|
|
|
|
<path refid="additional.dependencies"/>
|
|
|
|
<pathelement location="${build.dir}/classes/tools"/>
|
|
|
|
</classpath>
|
|
|
|
</java>
|
|
|
|
</target>
|
|
|
|
|
2011-05-30 20:08:14 -04:00
|
|
|
<target name="compile-tools" depends="common.compile-tools">
|
2010-05-03 09:20:09 -04:00
|
|
|
<compile
|
|
|
|
srcdir="src/tools/java"
|
|
|
|
destdir="${build.dir}/classes/tools">
|
|
|
|
<classpath refid="classpath"/>
|
|
|
|
</compile>
|
|
|
|
</target>
|
2011-03-10 23:32:14 -05:00
|
|
|
|
2011-04-01 13:43:24 -04:00
|
|
|
<target name="javadocs" depends="compile-core">
|
|
|
|
<sequential>
|
|
|
|
<mkdir dir="${javadoc.dir}/contrib-${name}"/>
|
|
|
|
<invoke-javadoc
|
|
|
|
destdir="${javadoc.dir}/contrib-${name}"
|
|
|
|
title="${Name} ${version} contrib-${name} API">
|
|
|
|
<sources>
|
|
|
|
<link href="../contrib-analyzers-common"/>
|
|
|
|
<link href=""/>
|
|
|
|
<packageset dir="${src.dir}"/>
|
|
|
|
</sources>
|
|
|
|
</invoke-javadoc>
|
|
|
|
<jarify basedir="${javadoc.dir}/contrib-${name}" destfile="${build.dir}/${final.name}-javadoc.jar"/>
|
|
|
|
</sequential>
|
|
|
|
</target>
|
2009-03-19 06:51:55 -04:00
|
|
|
</project>
|