Skip to content
This repository was archived by the owner on Mar 22, 2025. It is now read-only.

URLError when importing embedding functions #171

@stinenyhus

Description

@stinenyhus

When I try to use the functions for loading the pretrained word embeddings as shown in documentation (https://github.com/alexandrainst/danlp/blob/master/docs/docs/tasks/embeddings.md), I get an empty URLError.

Specifically, I run

from danlp.models.embeddings import load_context_embeddings_with_flair
from flair.data import Sentence

# Use the wrapper from DaNLP to download and load embeddings with Flair
# You can combine it with the static embeddings
stacked_embeddings = load_context_embeddings_with_flair(word_embeddings='wiki.da.wv')

or

from danlp.models import load_bert_base_model
model = load_bert_base_model()

I get the following error for both versions:
image

Environment

  • Operating system: Linux
  • Python version: 3.9.13
  • DaNLP version: 0.1.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions