Coder Social home page Coder Social logo

bert-keyword-extractor's People

Contributors

ibatra avatar rahul1582 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

bert-keyword-extractor's Issues

Convert Function Error

The convert Function that converts the phrases into B,H I tokens is not valid for repeated words in a keyphrase. As the function is made they will take the first occurance of the word and not the desired word in case of repetation.

Pre-trained model

Do you have a pre-trained model that we can use for a downstream system? It would be awesome if you can provide us with that!

How to deal with longer input?

I am going to use BERT-based Keyword Extraction. But MAX_LENGTH config is set to 75, so is it okay to change this value? As far as I know, BERT has a MAX input length of 512, but I would like to ask you how to solve it if you want to put a much longer input.

Found input variables without list of list.

Running the repository without any modifications and getting the following error? Does anyone know how to fix this?


TypeError Traceback (most recent call last)
in
58 pred_tags = [tags_vals[p_i] for p in predictions for p_i in p]
59 valid_tags = [tags_vals[l_ii] for l in true_labels for l_i in l for l_ii in l_i]
---> 60 print("F1-Score: {}".format(f1_score(pred_tags, valid_tags)))

~/miniconda3/lib/python3.8/site-packages/seqeval/metrics/sequence_labeling.py in f1_score(y_true, y_pred, average, suffix, mode, sample_weight, zero_division, scheme)
357 suffix=suffix)
358 else:
--> 359 _, _, f, _ = precision_recall_fscore_support(y_true, y_pred,
360 average=average,
361 warn_for=('f-score',),

~/miniconda3/lib/python3.8/site-packages/seqeval/metrics/sequence_labeling.py in precision_recall_fscore_support(y_true, y_pred, average, warn_for, beta, sample_weight, zero_division, suffix)
128 return pred_sum, tp_sum, true_sum
129
--> 130 precision, recall, f_score, true_sum = _precision_recall_fscore_support(
131 y_true, y_pred,
132 average=average,

~/miniconda3/lib/python3.8/site-packages/seqeval/metrics/v1.py in _precision_recall_fscore_support(y_true, y_pred, average, warn_for, beta, sample_weight, zero_division, scheme, suffix, extract_tp_actual_correct)
120 raise ValueError('average has to be one of {}'.format(average_options))
121
--> 122 check_consistent_length(y_true, y_pred)
123
124 pred_sum, tp_sum, true_sum = extract_tp_actual_correct(y_true, y_pred, suffix, scheme)

~/miniconda3/lib/python3.8/site-packages/seqeval/metrics/v1.py in check_consistent_length(y_true, y_pred)
95 is_list = set(map(type, y_true)) | set(map(type, y_pred))
96 if not is_list == {list}:
---> 97 raise TypeError('Found input variables without list of list.')
98
99 if len(y_true) != len(y_pred) or len_true != len_pred:

TypeError: Found input variables without list of list.

Multiple Errors

I get some errors while running the code, some packages are not imported. There are some other error that may be fixed but I did not go through the details. Ishaan, would you update your code?

More than one Keyword

I have a requirement were I need to extract more than one keyword from the sentence. Is it possible to do with just passing the text of interest once?
Example:
Input text: "I don't like this coffee because it's too sweet after having it for few days I don't like it anymore"
Output keywords: "too sweet" and "don't like it".

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.