Skip to content

Commit

Permalink
ICU-22373 Export segmentation dictionaries
Browse files Browse the repository at this point in the history
(cherry picked from commit 6c05042)
  • Loading branch information
robertbastian authored and sffc committed May 2, 2023
1 parent 5861e1f commit 6342f91
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions .ci-builds/.azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -633,7 +633,7 @@ jobs:
./bin/icuexportdata --mode uprops --index --copyright --verbose --destdir icuexportdata/uprops/fast --trie-type fast --all
mkdir -p icuexportdata/uprops/small
./bin/icuexportdata --mode uprops --index --copyright --verbose --destdir icuexportdata/uprops/small --trie-type small --all
displayName: 'Build property data export files'
displayName: 'Build property data files'
env:
LD_LIBRARY_PATH: lib
- script: |
Expand All @@ -642,7 +642,7 @@ jobs:
./bin/icuexportdata --mode norm --index --copyright --verbose --destdir icuexportdata/norm/fast --trie-type fast --all
mkdir -p icuexportdata/norm/small
./bin/icuexportdata --mode norm --index --copyright --verbose --destdir icuexportdata/norm/small --trie-type small --all
displayName: 'Build normalization data export files'
displayName: 'Build normalization data files'
env:
LD_LIBRARY_PATH: lib
- script: |
Expand All @@ -651,7 +651,7 @@ jobs:
./bin/icuexportdata --mode ucase --index --copyright --verbose --destdir icuexportdata/ucase/fast --trie-type fast --all
mkdir -p icuexportdata/ucase/small
./bin/icuexportdata --mode ucase --index --copyright --verbose --destdir icuexportdata/ucase/small --trie-type small --all
displayName: 'Build case data export files'
displayName: 'Build case data files'
env:
LD_LIBRARY_PATH: lib
- script: |
Expand All @@ -663,7 +663,19 @@ jobs:
mkdir -p icuexportdata/collation/implicithan
./bin/genrb -X -s data/coll/ --ucadata data/in/coll/ucadata-implicithan-icu4x.icu -d icuexportdata/collation/implicithan $FILES
rm icuexportdata/collation/implicithan/*.res
displayName: 'Build collation data export files'
displayName: 'Build collation data files'
env:
LD_LIBRARY_PATH: lib
- script: |
cd icu4c/source
mkdir -p icuexportdata/segmenter/dictionary
for FILE in `ls data/brkitr/dictionaries`
do
./bin/gendict --uchars data/brkitr/dictionaries/$FILE /dev/stdout | \
python3 -c 'import sys; data = sys.stdin.buffer.read(); print(f"trie_data = {[data[i + 1] << 8 | data[i] for i in range(64, len(data) - 1, 2)]}")' \
> icuexportdata/segmenter/dictionary/`basename $FILE .txt`.toml
done
displayName: 'Build segmenter dictionary files'
env:
LD_LIBRARY_PATH: lib
- task: ArchiveFiles@2
Expand Down

0 comments on commit 6342f91

Please sign in to comment.