Giter Site home page Giter Site logo

Comments (6)

PJ-Finlay avatar PJ-Finlay commented on May 18, 2024 3

Interesting, good catch. I was able to reproduce this. The tokenization looks fine so the sequence to sequence model is just outputting HTML characters. The training data (OpenSubtitles, ParaCrawl, UNPC from OPUS) is generally created by scraping real world data so I'm guessing some escaped HTML codes made their way into the training data. It might make sense to add a filter in the training scripts to filter out any lines that have HTML escape codes in them.

from argos-translate.

PJ-Finlay avatar PJ-Finlay commented on May 18, 2024 3

I ended up removing this filtering because it substantially slowed down training. I'm still looking it a better solution but hoping that better quality models in general will do this less.

from argos-translate.

pierotofy avatar pierotofy commented on May 18, 2024 1

You could also use: https://docs.python.org/3/library/html.html#html.unescape

And a regex or beautifulsoup https://stackoverflow.com/questions/9662346/python-code-to-remove-html-tags-from-a-string

Which would make it more generic.

from argos-translate.

PJ-Finlay avatar PJ-Finlay commented on May 18, 2024 1

That might make sense but for now I'm just removing data that has one of these strings instead of trying to clean it up.

from argos-translate.

PJ-Finlay avatar PJ-Finlay commented on May 18, 2024

This should be done for any models trained going forward.

html_entities = [''', ' ', '<', '>', '"']
html_tags = ['<a>', '<p>', '<h1>', '<i>']

Suggestions for additional things that might be in training data to filter appreciated.

from argos-translate.

Qix- avatar Qix- commented on May 18, 2024

Still seeing this on models downloaded fresh today, was there perhaps a regression?

https://github.com/Qix-/bellingbot/issues/2 has some sample text; RU->EN.

from argos-translate.

Related Issues (20)

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.