Youssef Benhachem commited on
Commit
b0eb681
·
1 Parent(s): d22e0a9
Files changed (1) hide show
  1. KHATT.py +0 -8
KHATT.py CHANGED
@@ -13,9 +13,7 @@
13
  # See the License for the specific language governing permissions and
14
  # limitations under the License.
15
 
16
- import os
17
  import datasets
18
- import pandas as pd
19
 
20
 
21
  _CITATION = """\
@@ -88,22 +86,16 @@ class KHATT(datasets.GeneratorBasedBuilder):
88
  """Yields examples."""
89
  idx = 0
90
 
91
- #if split == 'validation':
92
- #import ipdb;ipdb.set_trace()
93
-
94
  for archive in archives:
95
  for path, file in archive:
96
  # If we have an image
97
  if path.endswith(".tif"):
98
  if split != "test":
99
- # image filepath format: <FormNo>_<ParagraphNo>_<LineNo>.TIF
100
- #import ipdb; ipdb.set_trace()
101
  img_file = file
102
  else:
103
  text = ""
104
 
105
  elif path.endswith(".txt"):
106
- #import ipdb; ipdb.set_trace()
107
 
108
  text = file.read()
109
  text = text.decode('utf-8')
 
13
  # See the License for the specific language governing permissions and
14
  # limitations under the License.
15
 
 
16
  import datasets
 
17
 
18
 
19
  _CITATION = """\
 
86
  """Yields examples."""
87
  idx = 0
88
 
 
 
 
89
  for archive in archives:
90
  for path, file in archive:
91
  # If we have an image
92
  if path.endswith(".tif"):
93
  if split != "test":
 
 
94
  img_file = file
95
  else:
96
  text = ""
97
 
98
  elif path.endswith(".txt"):
 
99
 
100
  text = file.read()
101
  text = text.decode('utf-8')