-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3273 from flairNLP/doc-page
creating a doc page with autodocs and everything
- Loading branch information
Showing
120 changed files
with
4,679 additions
and
916 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
blank_issues_enabled: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
name: 'Build doc page' | ||
on: | ||
push: | ||
branches: [ main, doc-page ] | ||
tags: | ||
- "*" | ||
|
||
jobs: | ||
publish_docs: | ||
name: Build the docs using Sphinx and push to gh-pages | ||
runs-on: ubuntu-latest | ||
env: | ||
python-version: 3.8 | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
- name: setup python ${{ env.python-version }} | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ env.python-version }} | ||
- name: Install Flair dependencies | ||
run: pip install -e . | ||
- name: Install unittest dependencies | ||
run: pip install -r requirements-dev.txt | ||
- name: Install doc dependencies | ||
run: pip install -r docs/requirements.txt | ||
- name: Fetch git tags | ||
run: git fetch --tags origin | ||
- name: Build docs | ||
run: | | ||
sphinx-multiversion docs doc_build/ | ||
- name: Add redirect to stable doc | ||
run: | | ||
cp assets/redirect.html doc_build/index.html | ||
cp assets/redirect.html doc_build/404.html | ||
cp assets/README.md doc_build/README.md | ||
sed -i "s/\[VERSION\]/$(python -c 'import flair;print(flair.__version__)')/g" doc_build/index.html | ||
sed -i "s/\[VERSION\]/$(python -c 'import flair;print(flair.__version__)')/g" doc_build/404.html | ||
- name: Deploy | ||
uses: peaceiris/actions-gh-pages@v3 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: ./doc_build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# Docs For Flair NLP | ||
|
||
This branch is currently under construction. | ||
|
||
It will contain the docs for Flair NLP. | ||
Don't change files, as this branch will be autogenerated using github actions. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>Redirecting to https://flairnlp.github.io/</title> | ||
<meta charset="utf-8"> | ||
<meta http-equiv="refresh" content="0; URL=https://flairnlp.github.io/"> | ||
<link rel="canonical" href="https://flairnlp.github.io/"> | ||
</head> | ||
</html> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{% extends "!page.html" %} | ||
{% block body %} | ||
{% if current_version and latest_version and current_version != latest_version and current_version != release and current_version.name != latest_version.release %} | ||
<p> | ||
<strong> | ||
{% if current_version.is_released %} | ||
{% if latest_version.release.replace('v', '').split('.') | map('int') | list > current_version.name.replace('v', '').split('.') | map('int') | list %} | ||
You're reading an old version of this documentation. | ||
If you want up-to-date information, please have a look at <a href="{{ vpathto(latest_version.name) }}">{{latest_version.name}}</a>. | ||
{% endif %} | ||
{% else %} | ||
You're reading the documentation for a development version. | ||
For the latest stable version, please have a look at <a href="{{ vpathto(latest_version.name) }}">{{latest_version.name}}</a>. | ||
{% endif %} | ||
</strong> | ||
</p> | ||
{% endif %} | ||
{{ super() }} | ||
{% endblock %}% |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
{# As the version switcher will only work when JavaScript is enabled, we add it through JavaScript. | ||
#} | ||
<script> | ||
document.write(` | ||
<div class="version-switcher__container dropdown"> | ||
<button id="versionswitcherbutton" type="button" role="button" class="version-switcher__button btn btn-sm navbar-btn dropdown-toggle" data-bs-toggle="dropdown" aria-haspopup="listbox" aria-controls="versionswitcherlist" aria-label="Version switcher list"> | ||
{% if current_version.is_released %} {{ current_version.name }} {% if latest_version and item == latest_version %} (stable) {% endif %} {% else %} latest (dev) {% endif %} | ||
<span class="caret"></span> | ||
</button> | ||
<div id="versionswitcherlist" class="version-switcher__menu dropdown-menu list-group-flush py-0" role="listbox" aria-labelledby="versionswitcherbutton"> | ||
<!-- dropdown will be populated by javascript on page load --> | ||
{%- for item in versions|reverse %} | ||
<a class="list-group-item list-group-item-action py-1" href="{{ item.url }}" data-version-name="dev" data-version="devdocs"> | ||
<span>{% if item.is_released %} | ||
{{ item.name }} | ||
{% if latest_version and item == latest_version %} | ||
(stable) | ||
{% endif %} | ||
{% else %} | ||
latest (dev) | ||
{% endif %} | ||
{% if item == current_version %} | ||
[x] | ||
{% endif %}</span> | ||
</a> | ||
{%- endfor %} | ||
</div> | ||
</div> | ||
`); | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{% if versions %} | ||
<h3>{{ _('Versions') }}</h3> | ||
<ul> | ||
{%- for item in versions|reverse %} | ||
<li><a href="{{ item.url }}"> | ||
{% if item.is_released %} | ||
{{ item.name }} | ||
{% if latest_version and item == latest_version %} | ||
(stable) | ||
{% endif %} | ||
{% else %} | ||
latest ({{ item.name }}) | ||
{% endif %} | ||
</a></li> | ||
{%- endfor %} | ||
</ul> | ||
{% endif %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
flair.datasets.base | ||
=================== | ||
|
||
.. automodule:: flair.datasets.base |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
flair.datasets.biomedical | ||
========================= | ||
|
||
.. automodule:: flair.datasets.biomedical |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
flair.datasets.document_classification | ||
====================================== | ||
|
||
.. automodule:: flair.datasets.document_classification |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
flair.datasets.entity_linking | ||
============================= | ||
|
||
.. automodule:: flair.datasets.entity_linking |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
flair.datasets.ocr | ||
================== | ||
|
||
.. automodule:: flair.datasets.ocr |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
flair.datasets.relation_extraction | ||
================================== | ||
|
||
.. automodule:: flair.datasets.relation_extraction |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
flair.datasets.sequence_labeling | ||
================================ | ||
|
||
.. automodule:: flair.datasets.sequence_labeling |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
flair.datasets.text_image | ||
========================= | ||
|
||
.. automodule:: flair.datasets.text_image |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
flair.datasets.text_text | ||
========================= | ||
|
||
.. automodule:: flair.datasets.text_text |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
flair.datasets.treebanks | ||
======================== | ||
|
||
.. automodule:: flair.datasets.treebanks |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
flair.embeddings.base | ||
===================== | ||
|
||
.. automodule:: flair.embeddings.base |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
flair.embeddings.document | ||
========================= | ||
|
||
.. automodule:: flair.embeddings.document |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
flair.embeddings.image | ||
====================== | ||
|
||
.. automodule:: flair.embeddings.image |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
flair.embeddings.legacy | ||
============================ | ||
|
||
.. warning:: | ||
All embeddings in `flair.embeddings.legacy` are considered deprecated. | ||
there is no guarantee that they are still working and we recommend using different embeddings instead. | ||
|
||
.. automodule:: flair.embeddings.legacy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
flair.embeddings.token | ||
====================== | ||
|
||
.. automodule:: flair.embeddings.token |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
flair.embeddings.transformer | ||
============================ | ||
|
||
.. automodule:: flair.embeddings.transformer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
flair.data | ||
========== | ||
|
||
.. automodule:: flair.data |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
flair.datasets | ||
============== | ||
|
||
.. toctree:: | ||
:glob: | ||
:maxdepth: 2 | ||
|
||
datasets/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
flair.embeddings | ||
================ | ||
|
||
.. toctree:: | ||
:glob: | ||
:maxdepth: 2 | ||
|
||
embeddings/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
flair.models | ||
============ | ||
|
||
.. automodule:: flair.models |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
flair.nn | ||
======== | ||
|
||
.. automodule:: flair.nn |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
flair | ||
===== | ||
|
||
.. automodule:: flair |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
flair.splitter | ||
============== | ||
|
||
.. automodule:: flair.splitter |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
flair.tokenization | ||
================== | ||
|
||
.. automodule:: flair.tokenization |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
flair.trainers.plugins | ||
====================== | ||
|
||
.. automodule:: flair.trainers.plugins |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
flair.trainers | ||
============== | ||
|
||
.. automodule:: flair.trainers |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
API Docs | ||
======== | ||
|
||
.. toctree:: | ||
:glob: | ||
:maxdepth: 2 | ||
|
||
flair | ||
flair.* |
Oops, something went wrong.