manrajgrover / algorithms-js

Consumable Data Structures and Algorithms library in JavaScript
MIT License
199 stars 128 forks source link

Implement Viterbi Algorithm and a simple test case #117

Open formulahunter opened 4 years ago

formulahunter commented 4 years ago

Description of new feature, or changes

Implement Viterbi Algorithm and a simple test case

Checklist

Related Issues and Discussions

25

People to notify

@remes2000 @manrajgrover

formulahunter commented 4 years ago

The spec at the top of viterbi.js is intentionally generic -- it was written before the implementation to define the scope/requirements. Now that the implementation is finished, the spec might come across as a bit excessive. Let me know if you think it should be simplified.

The test case in testViterbi.js is very basic as there are not many constraints on the inputs, but of course I'm open to suggestions.