Coder Social home page Coder Social logo

sangaline / dodona Goto Github PK

View Code? Open in Web Editor NEW
34.0 34.0 7.0 1.33 MB

A framework for constructing keyboards and evaluating their performance with user interaction models.

License: GNU General Public License v3.0

Python 16.62% CMake 1.96% C++ 80.76% C 0.66%

dodona's People

Contributors

mgbeingcreative avatar rylanc24 avatar sangaline avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

dodona's Issues

FastEfficiency vector failure

Hi, I cannot use FastEfficiency. Something is not initialized properly.
I can provide corpus if needed...

Also, what's the point of exp_par? What is a sane value?
Thanks for this library! I try to create a t9 optimized keyboard...

ipython3
Python 3.4.1 (default, Oct 29 2014, 01:11:58) 
Type "copyright", "credits" or "license" for more information.

IPython 2.2.0 -- An enhanced Interactive Python.
?         -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help      -> Python's own help system.
object?   -> Details about 'object', use 'object??' for extra details.

In [1]: %pylab
Using matplotlib backend: Qt4Agg
Populating the interactive namespace from numpy and matplotlib

In [2]: from dodona import core, keyboards, wordlists

In [3]: from copy import deepcopy

In [4]: import time

In [5]: import numpy as np

In [6]: from multiprocessing import Pool

In [7]: dictionary = open('greek_corpus', 'r')

In [8]: 

In [8]: greek=                  'αάβγδεέζηήθιίϊΐκλμνξοόπρσςτυύΰϋφχψωώ'

In [9]: english_mapping_for_t9= 'aabcdeefhhgiiiikljnmooprsqtuuuuyxzww'

In [10]: wordlist = core.WordList()

In [11]: 

In [11]: 

In [11]: trans_table = str.maketrans(greek, english_mapping_for_t9)

In [12]: for line in dictionary:
   ....:       word,frequency=line.split()
   ....:       #print(word)
   ....:       wordlist.AddWord(word.translate(trans_table),int(frequency)-1943)
   ....:     #print(wordlist.WordListDict())
   ....:     

In [13]: t9_keyboard = keyboards.MakeT9Keyboard()

In [14]: t9_model = core.SimpleGaussianModel()

In [15]: t9_model.SetScale(0)

In [16]: print(1- core.FastEfficiency(t9_keyboard, t9_model, wordlist,1.0).Fitness())
---------------------------------------------------------------------------
IndexError                                Traceback (most recent call last)
<ipython-input-16-53a073886fe7> in <module>()
----> 1 print(1- core.FastEfficiency(t9_keyboard, t9_model, wordlist,1.0).Fitness())

IndexError: vector::_M_range_check

In [17]: 

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.