stevencuy/EECS-481-MDE — pull request #1 by matteovescovi (2014-02-23 11:45:44+00:00)
Title: Integrate presage in SETKeyboard for full predictive text functionality

Hi,

I finally found some time to take a look at your SETKeyboard project. Pretty cool stuff!

I also found some time to work on a .NET binding for presage. I wrapped the native C++ code in a C# assembly using the P/Invoke functionality provided by the .NET framework. It lives in the bindings/c#/ directory of the presage repository.

I first developed a test C# application using the binding to test that it worked properly. Then I decided to take a further step forward and to integrate it into your SETKeyboard application.

The fork uses presage for all predictive text functionality. The benefits are that SETKeyboard gets all the predictive algorithms that come bundled with presage (rather than the equivalent of the 3-gram smoothed predictor that you implemented in the DatabaseInteractor and PredictionHandler classes) and all the additional features that are part of presage, including the adaptive learning capability.

I also slightly modified the way predictions are requested by the UI, so that a prediction is always available whenever the buffer changes.

The changes on my branch are very small (ignoring the binaries). The source changes are limited to the MainWindows.xaml.cs source file, where I plugged in calls to presage.net rather than using the DatabaseInteractor and PredictionHandler objects (which have been removed). The other changes in the changeset are changes to the Visual Studio solution and project file and changes to the binaries that your team developers put under Git.

Give it a try!

You'll first have to install presage-0.9~beta and then rebuild SETKeyboard. You can find presage-0.9~beta here: https://sourceforge.net/projects/presage/files/presage/0.9~beta/win32/presage-0.9~beta20140216-setup.exe/download
The dependency on presage is basically embodied by the fact that the SETKeyboard assembly now references the presage.net.dll assembly (in the References section of the Visual Studio solution). I've updated the README.md to reflect the additional requirement on presage.

I think it would be worthwhile to get this officially integrated into your project as the learning functionality and additional predictors afford a better prediction that what's currently available.

Take it easy,
- Matteo