huangcm
2025-02-28 b45e871a67cd1272e3da9ba5bd383f832b0f1824
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/bash
# Updates the set of model with the most recent ones.
 
set -e
 
ANNOTATOR_BASE_URL=https://www.gstatic.com/android/text_classifier/q/live
ACTIONS_BASE_URL=https://www.gstatic.com/android/text_classifier/actions/q/live
LANGID_BASE_URL=https://www.gstatic.com/android/text_classifier/langid/q/live
 
download() {
   echo "$1/FILELIST"
   for f in $(wget -O- "$1/FILELIST"); do
       destination="$(basename -- $f)"
       wget "$1/$f" -O "$destination"
   done
}
 
cd "$(dirname "$0")"
 
download $ANNOTATOR_BASE_URL
download $ACTIONS_BASE_URL
download $LANGID_BASE_URL
 
echo "You may want to edit the file name of downloaded files, see external/libtextclassifier/Android.bp"