Skip to content
Discussion options

You must be logged in to vote

There was a bug in the above code. I've tried the following on my small data set and it works as normal

def read_files(filepath: Path, nlp: "Language") -> Iterable[Example]:
    # print(f"Opening {filepath}")
    diretory = os.fsencode(filepath)
    # we run the full pipeline and not just nlp.make_doc to ensure we have entities and sentences
    # which are needed during training of the entity linker
    with nlp.select_pipes(disable="entity_linker"):

        doc_bin = DocBin()
        # print("docbin len")
        # print(len(doc_bin))

        for files in os.listdir(diretory):
            filename = os.fsdecode(files)
            # print(f"file: {filename}")
            doc_bin_loop = D…

Replies: 2 comments 5 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
5 replies
@svlandeg
Comment options

@12dmj
Comment options

@12dmj
Comment options

@svlandeg
Comment options

@12dmj
Comment options

Answer selected by 12dmj
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
usage General spaCy usage feat / nel Feature: Named Entity linking
2 participants