Bert_OCR.pytorch icon indicating copy to clipboard operation
Bert_OCR.pytorch copied to clipboard

a small question

Open ustczhouyu opened this issue 5 years ago • 1 comments

hello, thank you for sharing the codes. I cannot understand the following line in dataset.py: out_of_char = f'[^{self.opt.character}]' self.opt.character is 0123456789abcdefghijklmnopqrstuvwxyz out_of_char is [^0123456789abcdefghijklmnopqrstuvwxyz] can you tell me what the three new characters [ ,^, and ] mean?

ustczhouyu avatar Jul 24 '20 20:07 ustczhouyu

hello, thank you for sharing the codes. I cannot understand the following line in dataset.py: out_of_char = f'[^{self.opt.character}]' self.opt.character is 0123456789abcdefghijklmnopqrstuvwxyz out_of_char is [^0123456789abcdefghijklmnopqrstuvwxyz] can you tell me what the three new characters [ ,^, and ] mean?

This means only focu on the characters in 0123456789abcdefghijklmnopqrstuvwxyz, dont care other characters. I also study in ustc and do some research in OCR. Can I add your wechat?

GaoXinJian-USTC avatar Sep 06 '21 02:09 GaoXinJian-USTC