Giter Club home page Giter Club logo

add-stress-to-epub's People

Contributors

vuizur avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

add-stress-to-epub's Issues

Offical™ embedded font

Hello,

I'm very impressed by the project and found it a few minutes ago.

I've noticed that the display of accented characters has a lot of variety depending on whatever fonts are embedded in the book or whatever. It would be nice for users to be able to add a font known to be good with calibre (maybe a wiki page)?

(edit: looks like this is a bug in KOReader, where it calls up a "fallback font" for the accented characters)

Use a CSS hack to add accents to preserve selected words

Hello
This software seems to physically add the accents on the words themselves. This requires that the user has special dictionary programs or files which can handle the words in their accented forms. I propose a possible way to add accents without needing special dictionaries.
We use a CSS ::before property to provide the accented character in a zero width inline-block span. The text generated by CSS is not selectable, at least in all the browsers I tested. It also works in Calibre and Foliate, partially in KOReader (it does not select as a whole word, but you can just drag a bit). It might work with all reader software, but it still seems useful.
Example html:

<html>
  <head>
    <style>
    [data-content]::before {
      content: attr(data-content); 
    }
    </style>
  </head>
  <body>
    нали<span data-content='&#x301;'></span>чный
  </body>
</html>

This should display нали́чный, but if you try to select it, it will select наличный (without the accent)
It would be great if this is an option for this tool!

Publishing a PyPI module

Hello!
I am the maintainer for VocabSieve. It would be great if you you can publish this to PyPI for programmatic use. All the existing ones (like russtress) does not consider context and make mistakes quite often.

On another note, is it really necessary to have spacy for this? It is a rather large dependency and in my experience works somewhat slowly. Have you tried pymorphy2? It seems to be able to tag words too.

Finish benchmarks

  • Put everything together and get the basic results
  • Perform detailed benchmark
  • Benchmark of old versions

Error when importing

Hi there!
Cool concept and exactly what I've been looking for to add stress marks to sentences from the SMARTool database to make Anki decks.

I installed on my Linux Mint 20 machine using
pip3 install git+https://github.com/Vuizur/add-stress-to-epub

When I run your example in my Python script, I get the following error at the import line:

File "/home/user_name/.local/lib/python3.8/site-packages/russian_text_stresser/russian_dictionary.py", line 45, in <module>
    class RussianDictionary:
  File "/home/user_name/.local/lib/python3.8/site-packages/russian_text_stresser/russian_dictionary.py", line 46, in RussianDictionary
    def __init__(self, db_file: str, simple_cases_file: str | None) -> None:
TypeError: unsupported operand type(s) for |: 'type' and 'NoneType'

KeyError: ''AUX"

image

I'm running your tool on Windows 11. I get a bunch of "Apparently wrong POS detected" messages, and then the tool fails with KeyError: 'AUX', all within about 30 seconds.

Here is the file on which I'm trying to add stress marks. Any feedback is appreciated!

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.