Skip to content

Commit

Permalink
Merge pull request #338 from BrikerMan/develop
Browse files Browse the repository at this point in the history
Release v1.1.1
  • Loading branch information
BrikerMan authored Mar 13, 2020
2 parents 9d72b7b + 27a03f1 commit 9f5b972
Show file tree
Hide file tree
Showing 46 changed files with 896 additions and 209 deletions.
152 changes: 0 additions & 152 deletions .circleci/config.yml

This file was deleted.

32 changes: 32 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# EditorConfig is awesome: http://EditorConfig.org

# top-most EditorConfig file
root = true

# Unix-style newlines with a newline ending every file
[*]
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true

# Matches multiple files with brace expansion notation
# Set default charset
[*.{js,py}]
charset = utf-8

# 4 space indentation
[*.py]
indent_style = space
indent_size = 4
max_line_length = 120

# 2 space indentation
[*.{html, yml, json, rst}]
indent_style = space
indent_size = 2
max_line_length = 120

# Tab indentation (no size specified)
[Makefile]
indent_style = tab
tab_width = 4
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ __pycache__/
# Distribution / packaging
.Python
build/
_build/
develop-eggs/
dist/
downloads/
Expand Down Expand Up @@ -105,7 +106,7 @@ venv.bak/
# mypy
.mypy_cache/


docs/README.rst
.idea
.vscode
venv-tf/*
Expand Down
23 changes: 23 additions & 0 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# .readthedocs.yml
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

# Required
version: 2

# Build documentation in the docs/ directory with Sphinx
sphinx:
configuration: docs/conf.py

# Build documentation with MkDocs
#mkdocs:
# configuration: mkdocs.yml

# Optionally build your docs in additional formats such as PDF and ePub
formats: all

# Optionally set the version of Python and requirements required to build your docs
python:
version: 3.7
install:
- requirements: ./requirements.dev.txt
27 changes: 9 additions & 18 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ env:

python:
- "3.6"
- "3.7"

cache: pip

Expand All @@ -35,23 +34,25 @@ stages:
- Lint
- name: Test
if: (branch = master) OR (type IN (pull_request))
- name: Document
if: branch = master AND (NOT (type IN (pull_request)))

install:
- pip install jieba
- pip install python-coveralls
- pip install -e .
- pip install tensorflow==1.14.0
- pip install coverage
- pip install nose
- pip install pytest-cov
- pip install pytest
- python -c "import kashgari;print(f'kashgari version {kashgari.__version__}')"
- git fetch --unshallow --quiet
- export PYTHONPATH=`pwd`

script: nosetests --with-coverage --cover-html --cover-html-dir=htmlcov
--cover-xml --cover-xml-file=coverage.xml --with-xunit
--cover-package="kashgari"
#script: nosetests --with-coverage --cover-html --cover-html-dir=htmlcov
# --cover-xml --cover-xml-file=coverage.xml --with-xunit
# --cover-package="kashgari"
# $TEST_FILE

script: pytest --doctest-modules --junitxml=test-reports/junit.xml
--cov=kashgari --cov-report=xml:coverage.xml --cov-report=html:htmlcov
$TEST_FILE

after_script:
Expand All @@ -68,13 +69,3 @@ jobs:
- pip install flake8 flake8-builtins
script:
- flake8 kashgari

- stage: Document
python: "3.6"
install:
- echo -e "machine github.com\n login ${GITHUB_TOKEN}" > ~/.netrc
- pip install mkdocs mkdocs-material pymdown-extensions
script:
- cp README.md mkdocs/docs/index.md
- cd mkdocs
- mkdocs gh-deploy --force --clean
17 changes: 8 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,8 @@
<a href="#overview">Overview</a> |
<a href="#performance">Performance</a> |
<a href="#quick-start">Quick start</a> |
<a href="https://kashgari.bmio.net/">Documentation</a> |
<a href="https://kashgari-zh.bmio.net/">中文文档</a> |
<a href="https://kashgari.bmio.net/about/contributing/">Contributing</a>
<a href="https://kashgari.readthedocs.io/">Documentation</a> |
<a href="https://kashgari.readthedocs.io/about/contributing/">Contributing</a>
</h4>

<!-- markdownlint-enable -->
Expand All @@ -46,8 +45,8 @@ Kashgari is a simple and powerful NLP Transfer learning framework, build a state
- **Human-friendly**. Kashgari's code is straightforward, well documented and tested, which makes it very easy to understand and modify.
- **Powerful and simple**. Kashgari allows you to apply state-of-the-art natural language processing (NLP) models to your text, such as named entity recognition (NER), part-of-speech tagging (PoS) and classification.
- **Built-in transfer learning**. Kashgari built-in pre-trained BERT and Word2vec embedding models, which makes it very simple to transfer learning to train your model.
- **Fully scalable**. Kashgari provides a simple, fast, and scalable environment for fast experimentation, train your models and experiment with new approaches using different embeddings and model structure.
- **Production Ready**. Kashgari could export model with `SavedModel` format for tensorflow serving, you could directly deploy it on the cloud.
- **Fully scalable**. Kashgari provides a simple, fast, and scalable environment for fast experimentation, train your models and experiment with new approaches using different embeddings and model structure.
- **Production Ready**. Kashgari could export model with `SavedModel` format for tensorflow serving, you could directly deploy it on the cloud.

## Our Goal

Expand All @@ -65,10 +64,10 @@ Kashgari is a simple and powerful NLP Transfer learning framework, build a state

Here is a set of quick tutorials to get you started with the library:

- [Tutorial 1: Text Classification](https://kashgari.bmio.net/tutorial/text-classification/)
- [Tutorial 2: Text Labeling](https://kashgari.bmio.net/tutorial/text-labeling/)
- [Tutorial 3: Text Scoring](https://kashgari.bmio.net/tutorial/text-scoring/)
- [Tutorial 4: Language Embedding](https://kashgari.bmio.net/embeddings/)
- [Tutorial 1: Text Classification](./docs/tutorial/text-classification.md)
- [Tutorial 2: Text Labeling](./docs/tutorial/text-labeling.md)
- [Tutorial 3: Text Scoring](./docs/tutorial/text-scoring.md)
- [Tutorial 4: Language Embedding](./docs/embeddings/index.md)

There are also articles and posts that illustrate how to use Kashgari:

Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion mkdocs/docs/FAQ.md → docs/FAQ.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# FAQ
# Frequently Asked Questions

## How can I run Keras on GPU

Expand Down
24 changes: 24 additions & 0 deletions docs/_static/css/extra.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
body,
h1,
h2,
h3,
h4,
h5,
h6,
input {
font-family: "Roboto", "Helvetica Neue", Helvetica, Arial, "Microsoft YaHei", "微软正黑体", "Microsoft JhengHei", sans-serif;
}

@media only screen and (min-width: 100em) {
html {
font-size: 125%;
}
}

.wy-side-nav-search>div.version {
margin-top: 5px;
}

.wy-nav-content {
max-width: none;
}
Loading

0 comments on commit 9f5b972

Please sign in to comment.