(text)
| 2 | |
| 3 | # is instruction English |
| 4 | def is_english_simple(text): |
| 5 | try: |
| 6 | text.encode(encoding='utf-8').decode('ascii') |
| 7 | except UnicodeDecodeError: |
| 8 | return False |
| 9 | else: |
| 10 | return True |
| 11 | |
| 12 | # bbox -> point (str) |
| 13 | def bbox_2_point(bbox, dig=2): |