predict() method should also give back index of document + paragraph
See original GitHub issueWe could add a document index to squad_examples
then test_examples
?
squad_examples = generate_squad_examples(question=question,
article_indices=article_indices,
metadata=df)
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:
- Created 4 years ago
- Comments:7
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Solved this issue. Will PR tonight!
Perfect!