Skip to content

Code huấn luyện PhoBERT không hoạt động #1

@vanlinhtruongdang

Description

@vanlinhtruongdang

Chào anh, em là sinh viên K16 UIT và hiện đang tìm hiểu công trình của anh để thực hiện dự án

Em không thể chạy file PhoBERT_HOS.ipynb vì có sự sai sót về cột dữ liệu trong dataset. Cụ thể là hàm prepare_data:

def prepare_data(file_path):
    df = pd.read_csv(file_path)

    # remove nan
    df = df.dropna()
    df = df.reset_index(drop=True)

    texts = df["text"].tolist()
    spans = df["spans"].tolist()

    # convert spans to binary representation
    binary_spans = []
    for span in spans:
        binary_span = []
        span = span.split(" ")
        for s in span:
            if s == "O":
                binary_span.append(0)
            else:
                binary_span.append(1)
        binary_spans.append(binary_span)

    return texts, binary_spans

Hàm này sử dụng 2 cột là text và spans, tuy nhiên các file csv như train_BIO_Word.csv hay train_BIO_syllable.csv đều không có cột này. Mong anh hồi đáp để chạy được file training này

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions