Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

predict() method should also give back index of document + paragraph

See original GitHub issue

We could add a document index to squad_examples then test_examples?

squad_examples = generate_squad_examples(question=question,

test_processor = BertProcessor(bert_model='bert-base-uncased', do_lower_case=True, is_training=False)
test_examples, test_features = test_processor.fit_transform(X=squad_examples)

model = load(os.path.join('models/bert_qa_squad_v1.1_sklearn', 'bert_qa_squad_v1.1_sklearn.joblib'))
final_prediction, all_predictions, all_nbest_json, scores_diff_json = model.predict(X=(test_examples, test_features))

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7

github_iconTop GitHub Comments

fmikaeliancommented, May 15, 2019

Solved this issue. Will PR tonight!

andrelmfariascommented, May 15, 2019


Read more comments on GitHub >

github_iconTop Results From Across the Web

Chapter 4. Text Vectorization and Transformation Pipelines
In this chapter, we will demonstrate how to use the vectorization process to combine linguistic techniques from NLTK with machine learning techniques in...
Read more >
TF-IDF from scratch in python on a real-world dataset.
TF-IDF stands for “Term Frequency — Inverse Document Frequency”. This is a technique to quantify words in a set of documents.
Read more >
DocX - how to get the index of a paragraph or list?
No, I was looking for a way to insert some content at a given index in the document, sort of like you would...
Read more >
Working With Text Data — scikit-learn 1.2.0 documentation
The goal of this guide is to explore some of the main scikit-learn tools on a single practical task: analyzing a collection of...
Read more >
How to Encode Text Data for Machine Learning with scikit-learn
This can be done by assigning each word a unique number. Then any document we see can be encoded as a fixed-length vector...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found