How do I change the order of recognized characters in CRNN networks(python)

Viewed 60

I have been searching for a long time on the Internet, but to no avail. Please, I need help or some ideas about how to achieve this. For example, the recognition character is apple, so if I want to put the "A" in apple at the end of the word, like "pplea":

a-p-p-l-e ==> pplea

I don't know where to modify it, is it from the encoding or the decoding? If so, how should it be modified?

3 Answers

The following may help:

word = "apple"

def word_converter():
    word2 = word + word[0]
    word3 = word2[1:]
    print(word3)

word_converter()

is simple using string position index

string = "apple"

#save fist char in one variable
first_char = string[0]

#remove first char of a string
string = string[1:]

#append first char of old string at the end of my new string
string = string + first_char

#print the result
print(string)

Its very simple. read string indexing in python

word = 'apple'
encoded = word[1:] + word[0]
print(encoded)
Related