Skip to content
Snippets Groups Projects
Commit be181ccf authored by Charlotte Mauvezin's avatar Charlotte Mauvezin
Browse files

linter

parent 1925e390
No related branches found
No related tags found
1 merge request!10Multiple input
Pipeline #103816 failed
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
import argparse import argparse
import glob
import logging import logging
import os import os
import re import re
from pathlib import Path
import editdistance import editdistance
import edlib import edlib
import termtables as tt
import glob
from pathlib import Path
import pandas as pd import pandas as pd
import termtables as tt
NOT_ENTITY_TAG = "O" NOT_ENTITY_TAG = "O"
...@@ -86,6 +84,8 @@ def parse_bio(path: str) -> dict: ...@@ -86,6 +84,8 @@ def parse_bio(path: str) -> dict:
try: try:
word, label = line.split() word, label = line.split()
except ValueError: except ValueError:
print(index)
print(line)
raise (Exception(f"The file {path} given in input is not in BIO format.")) raise (Exception(f"The file {path} given in input is not in BIO format."))
# Preserve hyphens to avoid confusion with the hyphens added later during alignment # Preserve hyphens to avoid confusion with the hyphens added later during alignment
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment