github flairNLP/flair v0.12.2
Release 0.12.2

latest releases: v0.13.1, v0.13.0
13 months ago

Another follow-up release to 0.12 that fixes a several bugs and adds a new multilingual frame tagger. Further, our new documentation website at https://flairnlp.github.io/docs/intro is now online!

New frame tagging model #3172

Adds a new model for detecting PropBank frame. The model is trained using the "FLERT" approach, so it is much stronger than the previous 'frame' model. We also added some training data from the universal proposition bank to improve multilingual frame detection.

Use it like this:

# load the large frame model
model = Classifier.load('frame-large')

# English sentence with the verb "return" in two different senses
sentence = Sentence("Dirk returned to Berlin to return his hat.")
model.predict(sentence)
print(sentence)

# German sentence with the verb "trug" in two different senses
sentence_de = Sentence("Dirk trug einen Koffer und trug einen Hut.")
model.predict(sentence_de)
print(sentence_de) 

This should print:

Sentence[9]: "Dirk returned to Berlin to return his hat." → ["returned"/return.01, "return"/return.02]

Sentence[9]: "Dirk trug einen Koffer und trug einen Hut." → ["trug"/carry.01, "trug"/wear.01]

The printout tells us that the verbs in both sentences are correctly disambiguated.

Documentation

Enhancements / New Features

  • more consistent behavior of context dropout and FLERT token #3168
  • settting device through environment variable #3148 (thanks @HallerPatrick)
  • modify Sentence.to_original_text() to take into account Sentence.start_position for whitespace calculation #3150 (thanks @mauryaland)
  • gather dev and test labels if the dataset is available #3162 (thanks @helpmefindaname)

Bug fixes

Don't miss a new flair release

NewReleases is sending notifications on new releases.