Skip to content

Commit 7726eac

Browse files
committed
Update appveyvor.yml
1 parent 1353ecf commit 7726eac

File tree

6 files changed

+41
-36
lines changed

6 files changed

+41
-36
lines changed

appveyor.docs.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ install:
2525
- sudo pip install --upgrade "tensorflow>=1.14,<2" deepcut
2626
- sudo pip install --upgrade boto smart_open sphinx sphinx-rtd-theme
2727

28-
# configuration for deploy mode, commit message with /(build and deloy docs)/
29-
# 1. build documents and upload HTML files to Appveyor's storage
30-
# 2. upload to thainlp.org/pythainlp/docs/<brnach_bane>
28+
# Configuration for deploy mode, commit message with /(build and deloy docs)/
29+
# 1. Build documents and upload HTML files to Appveyor's storage
30+
# 2. Upload to thainlp.org/pythainlp/docs/<brnach_bane>
3131

3232
only_commits:
3333
message: /(build and deploy docs)/
@@ -39,22 +39,22 @@ build_script:
3939
- export RELEASE=$(echo $RELEASE | cut -d'-' -f1)
4040
- export TODAY=$(date +'%Y-%m-%d')
4141
- make html
42-
- echo "Done building HTML files for the branch -- $APPVEYOR_REPO_BRANCH"
43-
- echo "Start cleaning the directory /docs/$APPVEYOR_REPO_BRANCH"
42+
- echo "Done building HTML files for the branch: $APPVEYOR_REPO_BRANCH"
43+
- echo "Start cleaning the directory: /docs/$APPVEYOR_REPO_BRANCH"
4444
- sudo bash ./clean_directory.sh $FTP_USER $FTP_PASSWORD $FTP_HOST $APPVEYOR_REPO_BRANCH
45-
- echo "Start Uploading files to thainlp.org/pythainlp/docs/$APPVEYOR_REPO_BRANCH"
45+
- echo "Start uploading files from: ./build/html"
46+
- echo "to: thainlp.org/pythainlp/docs/$APPVEYOR_REPO_BRANCH"
4647
- cd ./_build/html
47-
- echo "cd to ./build/html"
4848
- find . -type f -name "*" -print -exec curl --ftp-create-dir --ipv4 -T {} ftp://${FTP_USER}:${FTP_PASSWORD}@${FTP_HOST}/public_html/pythainlp/docs/$APPVEYOR_REPO_BRANCH/{} \;
49-
- echo "Done uploading"
50-
- echo "Done uploading files to -- thainlp.org/pythainlp/docs/$APPVEYOR_REPO_BRANCH"
49+
- echo "Done uploading."
50+
- echo "Files uploaded to: thainlp.org/pythainlp/docs/$APPVEYOR_REPO_BRANCH"
5151

5252
artifacts:
5353
- path: ./docs/_build/html
5454
name: document
5555

5656
after_build:
57-
- echo "Done build and deploy"
57+
- echo "Done build and deploy."
5858
- appveyor exit
5959

6060
test: off

appveyor.yml

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ skip_commits:
1111
environment:
1212
global:
1313
CMD_IN_ENV: "cmd /E:ON /V:ON /C .\\appveyor\\run_with_env.cmd"
14+
PYTHONIOENCODING: "utf-8"
15+
ICU_VERSION: "64.2"
16+
1417
matrix:
1518
# - PYTHON: "C:/Python36"
1619
# PYTHON_VERSION: "3.6"
@@ -46,36 +49,35 @@ environment:
4649
# DISTUTILS_USE_SDK: "1"
4750

4851
init:
49-
- "ECHO %PYTHON% %PYTHON_VERSION% %PYTHON_ARCH%"
50-
# - ps: "ls C:/Python*"
52+
- ECHO "PYTHON %PYTHON%"
53+
- ECHO "PYTHON_VERSION %PYTHON_VERSION%"
54+
- ECHO "PYTHON_ARCH %PYTHON_ARCH%"
55+
- ECHO "Installed SDKs:"
56+
- ps: "ls C:/Python*"
57+
- ps: "ls \"C:/Program Files/Microsoft SDKs/Windows\""
58+
- IF "%ARCH%"=="32" (call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x86) ELSE (ECHO "Probably a 64-bit build")
59+
- IF "%ARCH%"=="64" (call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" amd64) ELSE (ECHO "Probably a 32-bit build")
5160

5261
platform:
5362
- x64
5463

5564
install:
5665
- chcp 65001
57-
- set PYTHONIOENCODING=utf-8
58-
# - set ICU_VERSION=64.2
59-
# - ECHO Installed SDKs:
60-
# - ps: "ls \"C:/Program Files/Microsoft SDKs/Windows\""
61-
- IF "%ARCH%"=="32" (call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x86) ELSE (ECHO "Probably a 64-bit build")
62-
- IF "%ARCH%"=="64" (call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" amd64) ELSE (ECHO "Probably a 32-bit build")
6366
- '"%VS140COMNTOOLS%\..\..\VC\vcvarsall.bat" %PLATFORM%'
6467
- ps: if (-not(Test-Path($env:PYTHON))) { & appveyor\install.ps1 }
6568
- SET PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH%
6669
- python --version
6770
- pip --version
68-
# - "%PYTHON%\\python.exe -m pip install wheel"
6971
- pip install --disable-pip-version-check --user --upgrade pip setuptools
7072
- pip install coveralls[yaml]
7173
- pip install coverage
7274
- pip install "tensorflow>=1.14,<2" deepcut
73-
# There is no 32-bit build for torch
7475
- pip install torch==1.2.0+cpu -f https://download.pytorch.org/whl/torch_stable.html
7576
- pip install %PYICU_PKG%
7677
- pip install %ARTAGGER_PKG%
7778
- pip install -e .[full]
7879

7980
test_script:
81+
- python --version
8082
- pip --version
8183
- python setup.py test

docs/build_docs.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1+
#!/bin/bash
12
make html

docs/clean_directory.sh

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@ BRANCH_NAME=$4
1515
remove_all_files()
1616
{
1717
# DIRECTORY=$1
18-
echo "delete files in: $1"
19-
for f in `curl --list-only --ftp-create-dirs --ipv4 ftp://$FTP_USER:$FTP_PASSWORD@$FTP_HOST/$1/`; do
18+
echo "Delete files in: $1"
19+
for f in `curl --list-only --ftp-create-dirs --ipv4 ftp://$FTP_USER:$FTP_PASSWORD@$FTP_HOST/$1/`; do
2020
if [[ -d "$f" ]] || [[ "$f" = _* ]] || [[ "$f" = .doctree ]] || [[ "$f" != *"."* ]]; then
2121
echo "--- deleting files in folder: $1/$f";
2222
remove_all_files $1/$f
2323
else
24-
echo "delete a file: $f"
24+
echo "Delete a file: $f"
2525
curl --ipv4 ftp://$FTP_USER:$FTP_PASSWORD@$FTP_HOST -Q "DELE $1/$f"
2626
fi
2727
done
@@ -30,25 +30,25 @@ remove_all_files()
3030
remove_empty_folders()
3131
{
3232

33-
echo "delete empty folders in: $1"
34-
for f in `curl --list-only --ftp-create-dirs --ipv4 ftp://$FTP_USER:$FTP_PASSWORD@$FTP_HOST/$1/`; do
33+
echo "Delete empty folders in: $1"
34+
for f in `curl --list-only --ftp-create-dirs --ipv4 ftp://$FTP_USER:$FTP_PASSWORD@$FTP_HOST/$1/`; do
3535
if [[ -d "$f" ]] || [[ "$f" = _* ]] || [[ "$f" = fonts ]] || [[ "$f" = pythainlp ]] || [[ "$f" = .doctree ]] || [[ "$f" != *"."* ]]; then
36-
echo "--- deleting folders in: $1/$f";
36+
echo "--- Deleting folders in: $1/$f";
3737
remove_empty_folders $1/$f
3838
curl --ipv4 ftp://$FTP_USER:$FTP_PASSWORD@$FTP_HOST -Q "RMD $1/$f"
3939
else
40-
echo "delete a folder: $f"
40+
echo "Delete a folder: $f"
4141
curl --ipv4 ftp://$FTP_USER:$FTP_PASSWORD@$FTP_HOST -Q "RMD $1/$f"
4242
fi
4343
done
4444
}
4545

46-
echo "Start removing all files within 'public_html/pythainlp/docs/$BRANCH_NAME/'";
46+
echo "Start removing all files within: public_html/pythainlp/docs/$BRANCH_NAME/";
4747

4848
remove_all_files public_html/pythainlp/docs/$BRANCH_NAME;
4949

50-
echo "Start removing all empty folders within 'public_html/pythainlp/docs/$BRANCH_NAME/'";
50+
echo "Start removing all empty folders within: public_html/pythainlp/docs/$BRANCH_NAME/";
5151

5252
remove_empty_folders public_html/pythainlp/docs/$BRANCH_NAME;
5353

54-
echo "Done";
54+
echo "Done.";

docs/conf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
current_branch = '<unknown>'
3939

4040
# The short X.Y version
41-
version = '{} ({}) </br> Published date: {}'.format(current_branch, release, today)
41+
version = '{} ({}) <br /> Published date: {}'.format(current_branch, release, today)
4242

4343
# The full version, including alpha/beta/rc tags
4444
release = release
@@ -186,7 +186,7 @@
186186

187187
# Example configuration for intersphinx: refer to the Python standard library.
188188
intersphinx_mapping = {'python': ('https://docs.python.org/', None),
189-
'NLTK': ('http://nltk.org', None),
189+
'NLTK': ('http://www.nltk.org', None),
190190
}
191191

192192
# -- Options for todo extension ----------------------------------------------

docs/notes/getting_started.rst

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
Getting Started
2-
=====================================
2+
===============
3+
34
PyThaiNLP is a Python library for natural language processing (NLP) of Thai language. With this package, you can perform NLP tasks such as text classification and text tokenization.
45

56
**Tokenization Example**::
@@ -16,6 +17,7 @@ Thai has historically faced a lot of NLP challenges. A quick list of them includ
1617

1718
#. **Word segmentation** - Thai does not use space and word segmentation is not easy. It boils down to understanding the context and ruling out words that do not make sense. This is a similar issue that other Asian languages such as Japanese and Chinese face in different degrees. For languages with space, a similar but less extreme problem would be multi-word expressions, like the French word for potato — 'pomme de terre'. In Thai, the best known example is "ตา-กลม" and "ตาก-ลม". As of recent, new techniques that capture words, subwords, and letters in vectors seem poised to overcome to issue.
1819

19-
**Example for classification**
20-
21-
https://github.com/PyThaiNLP/pythainlp/tree/dev/notebooks
20+
Tutorial Notebooks
21+
==================
22+
- [PyThaiNLP Get Started](https://www.thainlp.org/pythainlp/tutorials/notebooks/pythainlp-get-started.html)
23+
- [Other tutorials](https://www.thainlp.org/pythainlp/tutorials/)

0 commit comments

Comments
 (0)