Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GH-2689: Documentation and printout changes for release #2704

Merged
merged 23 commits into from
Apr 5, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 6 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,9 @@ document embeddings, including our proposed **[Flair embeddings](https://www.acl
* **A PyTorch NLP framework.** Our framework builds directly on [PyTorch](https://pytorch.org/), making it easy to
train your own models and experiment with new approaches using Flair embeddings and classes.

Now at [version 0.10](https://github.com/flairNLP/flair/releases)!
Now at [version 0.11](https://github.com/flairNLP/flair/releases)!


## Join Us: Open Positions at HU-Berlin!

If you're interested in doing NLP/ML research to pursue a PhD and love open source, consider applying to [open positions](https://github.com/flairNLP/flair/issues/2446) for research associates and PhD candidates at Humboldt University Berlin! We currently have **three open positions** with application deadlines soon!

## State-of-the-Art Models

Flair ships with state-of-the-art models for a range of NLP tasks. For instance, check out our latest NER models:
Expand Down Expand Up @@ -79,22 +75,24 @@ tagger.predict(sentence)
Done! The `Sentence` now has entity annotations. Print the sentence to see what the tagger found.

```python
# print the sentence with all annotations
print(sentence)

print('The following NER tags are found:')

# iterate over entities and print
# iterate over entities and print each
for entity in sentence.get_spans('ner'):
print(entity)
```

This should print:

```console
Sentence: "I love Berlin ." - 4 Tokens
Sentence: "I love Berlin ." → ["Berlin"/LOC]

The following NER tags are found:

Span [3]: "Berlin" [− Labels: LOC (0.9992)]
Span[2:3]: "Berlin" LOC (0.999)
```

## Tutorials
Expand Down
8 changes: 6 additions & 2 deletions flair/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@
else:
device = torch.device("cpu")

# global variable: version
__version__ = "0.11"

# global variable: arrow symbol
_arrow = " → "

from . import ( # noqa: E402 import after setting device
data,
Expand All @@ -23,8 +28,6 @@
visual,
)

__version__ = "0.10"

logging.config.dictConfig(
{
"version": 1,
Expand Down Expand Up @@ -60,4 +63,5 @@ def set_seed(seed: int):
"nn",
"trainers",
"visual",
"datasets",
]
Loading