Question: I'm trying to use downloaded custom language for the google's Tesseract OCR engine, it has the following files but no traineddata file, please see my code below which gives me an error only when I try to use the new language, can someone help.

files:  

cp27.DangAmbigs  

cp27.freq-dawg  

cp27.inttemp  

cp27.normproto  

cp27.pffmtablecp  

cp27.unicharset  

cp27.user-words  

cp27.word-dawg  

Download Link: <http://www.sendspace.com/file/gd7j4i>  

error message: Failed to initialise tesseract engine  

```
Pix test = PixConverter.ToPix(image);

try
{
    using (var engine = new TesseractEngine(@"tessdata", @"cp27", EngineMode.Default))
    {
        engine.SetVariable("tessedit_char_whitelist", charset);

        using (var page = engine.Process(test))
        {
            return(page.GetText());
        }
    }
}
catch { }

```

Answer: 
I would probably bind to keyup, then check for space and if it is space I would create a div above the textarea that will have a clickable 'X', something like this (obviously you need some css to make it look nice and you need a container div above your text area with height auto to append your tags to instead of the body tag):

```
$("#foo" ).bind( "keyup", function() 
{
  if (event.which == 32)
  {
     var thisTagText = $('#foo').val();

     $('body').append('<div class="myTag">' + thisTagText + '<div onclick="removeTag();">X</div></div>'); 
  }
});

```
Did your answer get cut off?

Anyway, use something like this:

HTML:

```
<div id="tags"></div><input type="text" id="tags-input"/>

```

JavaScript:

```
var tagsInput = $("#tags-input"),
    tags = $("#tags");

tagsInput.keydown(function(e){
    if (e.keyCode == 32) { // when space bar is pressed
        var tag = $("<span>", {html: this.value, class: "tag"});
        var removeTag = $("<span>", {class: "tag-delete"});
        tag.append(removeTag);

        tags.append(tag); // add span to div

        removeTag.click(function(){
           tag.remove(); //delete tag
        });

        this.value = ""; // clear value
    }
});

```

I'll leave it up to you to style it.