GithubHelp home page GithubHelp logo

Comments (8)

tkurosaka avatar tkurosaka commented on August 11, 2024

I tested with other compound words. It seems in majority case, "-" is treated as a separate token. But there are cases where the compound words are treated as one (for example "e-commerce", "non-profilt", "multi-lingual"), and there are compound words where the hyphen is attached to the second word ("turn-key" => ["turn", "-key"]; "word-for-word" => ["word", "-", "for", "-word"]; "world-class" => ["world", "-class"]).
I suspect this might be caused by inconsistency in the annotation.

from babzel.

abzif avatar abzif commented on August 11, 2024

You made an interesting observation!
Your hypothesis that hyphen words are inconsistently annotated seems right.
I looked in *.conllu file and hyphen words are most often splited but there are cases that they are treated as single word.
I noticed examples: so-called, african-american, avant-garde, run-on and others.
It may be the cause of tokenizer inconsistent behavior.

from babzel.

abzif avatar abzif commented on August 11, 2024

I think it can be fixed. During implementation I noticed inconsistent annotations for 'de', 'fi' language and implemented so-called Transformer. Transformer read conllu sentences and tries to fix it or reject it.
EnTransformer can check sentences and if some word is not splitted hyphen word then reject such sentence. Tokenizer model should then always split a word at hyphen.

from babzel.

tkurosaka avatar tkurosaka commented on August 11, 2024

That sounds very promising! Will it take a while to get the model fixed?

from babzel.

abzif avatar abzif commented on August 11, 2024

Models are automatically recomputed every month on 27th day. However I don't have much time recently, so I am not sure if I make a fix soon.

from babzel.

abzif avatar abzif commented on August 11, 2024

I've just make a small fix. Sentences which contains not splitted words with hyphens are rejected. Hopefully, trained models will consistently split words at hyphens.
Please check after 27-th february when new models are recomputed.

from babzel.

tkurosaka avatar tkurosaka commented on August 11, 2024

Thank you. I'll check out the new model when it becomes available!

from babzel.

tkurosaka avatar tkurosaka commented on August 11, 2024

In my smoke test, the new model handled compound words with "-" very consistently. "yellow t-shirt!" is now tokenized as "yellow", "t", "-", "shirt" and "!". "post-brexit", is now "post", "-", and "brexit". It seems this model fixed the issue. Thank you!

from babzel.

Related Issues (6)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.