Most important characters extraction












0















I'm extracting the character via OCR from id card. I have 4 different image but all images for 1 person(me). There'are 4 different text extraction results. For example, name extraction



[' BEYHAN', ' S BEYHAN h of', ' 2EYHAN', ' B3YHAN U']


this kind of array is returning. So i want to extract BEYHAN but there is some missing parts.



I can do most common words in array and of course will return BEYHAN but this is just works for this case. I want to get information of '2EYHAN' and 'B3YHAN'. This are not BEYHAN but it has some information (2-EYHAN) and (B-3-YHAN). So do you know is there any algorithm or methods to use this kind of results ?










share|improve this question

























  • problem is extarct the name of person correctly. There are 4 different results but which one is correct ? We don't know. But we can combine the different results and can undersant what name is

    – Beyhan Gül
    Jan 1 at 14:34
















0















I'm extracting the character via OCR from id card. I have 4 different image but all images for 1 person(me). There'are 4 different text extraction results. For example, name extraction



[' BEYHAN', ' S BEYHAN h of', ' 2EYHAN', ' B3YHAN U']


this kind of array is returning. So i want to extract BEYHAN but there is some missing parts.



I can do most common words in array and of course will return BEYHAN but this is just works for this case. I want to get information of '2EYHAN' and 'B3YHAN'. This are not BEYHAN but it has some information (2-EYHAN) and (B-3-YHAN). So do you know is there any algorithm or methods to use this kind of results ?










share|improve this question

























  • problem is extarct the name of person correctly. There are 4 different results but which one is correct ? We don't know. But we can combine the different results and can undersant what name is

    – Beyhan Gül
    Jan 1 at 14:34














0












0








0








I'm extracting the character via OCR from id card. I have 4 different image but all images for 1 person(me). There'are 4 different text extraction results. For example, name extraction



[' BEYHAN', ' S BEYHAN h of', ' 2EYHAN', ' B3YHAN U']


this kind of array is returning. So i want to extract BEYHAN but there is some missing parts.



I can do most common words in array and of course will return BEYHAN but this is just works for this case. I want to get information of '2EYHAN' and 'B3YHAN'. This are not BEYHAN but it has some information (2-EYHAN) and (B-3-YHAN). So do you know is there any algorithm or methods to use this kind of results ?










share|improve this question
















I'm extracting the character via OCR from id card. I have 4 different image but all images for 1 person(me). There'are 4 different text extraction results. For example, name extraction



[' BEYHAN', ' S BEYHAN h of', ' 2EYHAN', ' B3YHAN U']


this kind of array is returning. So i want to extract BEYHAN but there is some missing parts.



I can do most common words in array and of course will return BEYHAN but this is just works for this case. I want to get information of '2EYHAN' and 'B3YHAN'. This are not BEYHAN but it has some information (2-EYHAN) and (B-3-YHAN). So do you know is there any algorithm or methods to use this kind of results ?







python string ocr






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jan 1 at 22:03









desertnaut

19.1k73976




19.1k73976










asked Jan 1 at 14:27









Beyhan GülBeyhan Gül

9918




9918













  • problem is extarct the name of person correctly. There are 4 different results but which one is correct ? We don't know. But we can combine the different results and can undersant what name is

    – Beyhan Gül
    Jan 1 at 14:34



















  • problem is extarct the name of person correctly. There are 4 different results but which one is correct ? We don't know. But we can combine the different results and can undersant what name is

    – Beyhan Gül
    Jan 1 at 14:34

















problem is extarct the name of person correctly. There are 4 different results but which one is correct ? We don't know. But we can combine the different results and can undersant what name is

– Beyhan Gül
Jan 1 at 14:34





problem is extarct the name of person correctly. There are 4 different results but which one is correct ? We don't know. But we can combine the different results and can undersant what name is

– Beyhan Gül
Jan 1 at 14:34












1 Answer
1






active

oldest

votes


















1














First of all, there are specific numbers that represent letters. So put in wordt the word that you need to extract and in wordn put the represented number. The code below is trying to match the word letter by letter and check if it is matched the letter or the represented number. if the all later matches then they will print the whole word if not he will start from the beginning.
I just put the number as an example.
Run the code https://onlinegdb.com/BJaknZFbE



words = ['BEYHAN', ' S BEYHAN h of', '2EYHAN', 'B3YHAN U']
wordt='BEYHAN';
wordn=["2","3","4","6","7","8"];
m=0
c=''
n=0
for word in words:
c=''
m=0
n=0
for letter in word:

if letter==wordt[n] or letter==wordn[n]:

m=m+1
c=c+letter;
else :
if len(wordt)!=m:
m=0
n=n-1
c=''
else:
print(c) ;
c=''
m=0
n=0
if len(wordt)-1>n:
n=n+1
else:
n=0
if len(wordt)==m:
print(c) ;
c=''
m=0
n=0





share|improve this answer





















  • 1





    Can you give some explanation of what your code does, how it works, and what the variables represent?

    – rassar
    Jan 1 at 15:52











  • I already add the explanation.

    – i_th
    Jan 1 at 15:57











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53996265%2fmost-important-characters-extraction%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









1














First of all, there are specific numbers that represent letters. So put in wordt the word that you need to extract and in wordn put the represented number. The code below is trying to match the word letter by letter and check if it is matched the letter or the represented number. if the all later matches then they will print the whole word if not he will start from the beginning.
I just put the number as an example.
Run the code https://onlinegdb.com/BJaknZFbE



words = ['BEYHAN', ' S BEYHAN h of', '2EYHAN', 'B3YHAN U']
wordt='BEYHAN';
wordn=["2","3","4","6","7","8"];
m=0
c=''
n=0
for word in words:
c=''
m=0
n=0
for letter in word:

if letter==wordt[n] or letter==wordn[n]:

m=m+1
c=c+letter;
else :
if len(wordt)!=m:
m=0
n=n-1
c=''
else:
print(c) ;
c=''
m=0
n=0
if len(wordt)-1>n:
n=n+1
else:
n=0
if len(wordt)==m:
print(c) ;
c=''
m=0
n=0





share|improve this answer





















  • 1





    Can you give some explanation of what your code does, how it works, and what the variables represent?

    – rassar
    Jan 1 at 15:52











  • I already add the explanation.

    – i_th
    Jan 1 at 15:57
















1














First of all, there are specific numbers that represent letters. So put in wordt the word that you need to extract and in wordn put the represented number. The code below is trying to match the word letter by letter and check if it is matched the letter or the represented number. if the all later matches then they will print the whole word if not he will start from the beginning.
I just put the number as an example.
Run the code https://onlinegdb.com/BJaknZFbE



words = ['BEYHAN', ' S BEYHAN h of', '2EYHAN', 'B3YHAN U']
wordt='BEYHAN';
wordn=["2","3","4","6","7","8"];
m=0
c=''
n=0
for word in words:
c=''
m=0
n=0
for letter in word:

if letter==wordt[n] or letter==wordn[n]:

m=m+1
c=c+letter;
else :
if len(wordt)!=m:
m=0
n=n-1
c=''
else:
print(c) ;
c=''
m=0
n=0
if len(wordt)-1>n:
n=n+1
else:
n=0
if len(wordt)==m:
print(c) ;
c=''
m=0
n=0





share|improve this answer





















  • 1





    Can you give some explanation of what your code does, how it works, and what the variables represent?

    – rassar
    Jan 1 at 15:52











  • I already add the explanation.

    – i_th
    Jan 1 at 15:57














1












1








1







First of all, there are specific numbers that represent letters. So put in wordt the word that you need to extract and in wordn put the represented number. The code below is trying to match the word letter by letter and check if it is matched the letter or the represented number. if the all later matches then they will print the whole word if not he will start from the beginning.
I just put the number as an example.
Run the code https://onlinegdb.com/BJaknZFbE



words = ['BEYHAN', ' S BEYHAN h of', '2EYHAN', 'B3YHAN U']
wordt='BEYHAN';
wordn=["2","3","4","6","7","8"];
m=0
c=''
n=0
for word in words:
c=''
m=0
n=0
for letter in word:

if letter==wordt[n] or letter==wordn[n]:

m=m+1
c=c+letter;
else :
if len(wordt)!=m:
m=0
n=n-1
c=''
else:
print(c) ;
c=''
m=0
n=0
if len(wordt)-1>n:
n=n+1
else:
n=0
if len(wordt)==m:
print(c) ;
c=''
m=0
n=0





share|improve this answer















First of all, there are specific numbers that represent letters. So put in wordt the word that you need to extract and in wordn put the represented number. The code below is trying to match the word letter by letter and check if it is matched the letter or the represented number. if the all later matches then they will print the whole word if not he will start from the beginning.
I just put the number as an example.
Run the code https://onlinegdb.com/BJaknZFbE



words = ['BEYHAN', ' S BEYHAN h of', '2EYHAN', 'B3YHAN U']
wordt='BEYHAN';
wordn=["2","3","4","6","7","8"];
m=0
c=''
n=0
for word in words:
c=''
m=0
n=0
for letter in word:

if letter==wordt[n] or letter==wordn[n]:

m=m+1
c=c+letter;
else :
if len(wordt)!=m:
m=0
n=n-1
c=''
else:
print(c) ;
c=''
m=0
n=0
if len(wordt)-1>n:
n=n+1
else:
n=0
if len(wordt)==m:
print(c) ;
c=''
m=0
n=0






share|improve this answer














share|improve this answer



share|improve this answer








edited Jan 1 at 15:56

























answered Jan 1 at 15:44









i_thi_th

1,1851718




1,1851718








  • 1





    Can you give some explanation of what your code does, how it works, and what the variables represent?

    – rassar
    Jan 1 at 15:52











  • I already add the explanation.

    – i_th
    Jan 1 at 15:57














  • 1





    Can you give some explanation of what your code does, how it works, and what the variables represent?

    – rassar
    Jan 1 at 15:52











  • I already add the explanation.

    – i_th
    Jan 1 at 15:57








1




1





Can you give some explanation of what your code does, how it works, and what the variables represent?

– rassar
Jan 1 at 15:52





Can you give some explanation of what your code does, how it works, and what the variables represent?

– rassar
Jan 1 at 15:52













I already add the explanation.

– i_th
Jan 1 at 15:57





I already add the explanation.

– i_th
Jan 1 at 15:57




















draft saved

draft discarded




















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53996265%2fmost-important-characters-extraction%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

MongoDB - Not Authorized To Execute Command

How to fix TextFormField cause rebuild widget in Flutter

in spring boot 2.1 many test slices are not allowed anymore due to multiple @BootstrapWith