Giter Site home page Giter Site logo

anceps's People

Contributors

dargones avatar

Stargazers

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

Watchers

 avatar  avatar  avatar

Forkers

diyclassics gboog

anceps's Issues

Anceps crashes when scanning Seneca's Tragedies

I am running Anceps to create a training set for neural networks. When running the program on Seneca's Medea, it crashes on line 662, patrioque pendet. It also seems to have trouble somewhere around Hercules Oetaeus' lines 276-279:

perfer manus quocumque quid cessas dea
utere furente quod iubes fieri nefas
reperi quid haeres ipsa iam cesses licet
haec ira satis est nvt pectoris sani parum

The error reads:

File "anceps/src/scan/word.py", line 103, in __get_prefix
    prefix = Word.PREFIX.match(option.scansion).group()
AttributeError: 'NoneType' object has no attribute 'group'

If fixed it in the Word class, by adding a try to the init function:

        if next_word:
            try:
                self.next_word_prefix = next_word.__get_prefix()
            except:
                self.next_word_prefix = None
        else:
            self.next_word_prefix = None

The scansion will fail, but that is fine for my use case. As long as the other lines are scanned ๐Ÿ—ก๏ธ

I am not sure why Oetaeus goes wrong :S Anyway, great tool!

Divide by zero error in calculate_frequencies()

Hi Dargones,

I was experimenting with small datasets of various meters. In the case of the glyconeus and the iambic dimeter, I used Seneca Medea 75โ€“92 and 849-855 respectively. These verses do not have elisions, which crashes Anceps, as it tries to calculate the frequency of elisions in the given dataset. Maybe you could add a try or a small check for zero in the calculate_frequencies function in analyze.py. The error almost never occurs, and only for elisions of course, but just wanted to let you know :)

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.