• Iago Breno Araujo
  • 0 Points
  • Member since 2019

  • Chatter
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
  • 7
I'm working on the Word Meaning and Word2vec badge and the Hands-on: Construct examples for each W2V variant is taking forever (it's already been running for 2 hours).  Has anyone else gotten through this?  How long did this part take?

My best guess is that I have something wrong but I'm not sure what since I've gotten no error messages...but when I stoped it it looks like it's still in the while loop - do can anyone provide some guidance on where I'm wrong and what I might want to look at to get back on track?

while True:
    # TODO: select a random sentence index using random.randint and get that
    # sentence. Be careful to avoid indexing errors.
    sentence_idx = random.randint(0,len(numericalized_sentences)-1)
    sentence = numericalized_sentences[sentence_idx]
    # TODO: Select a random window index using random.randint
    # and obtain that window of size n. Be careful to avoid indexing errors.
    window_idx = random.randint(0,len(sentence)-1)
    window = sentence[window_idx:k]
    if len(window) <= n//2:


  • January 02, 2019
  • Like
  • 1