from keybert import KeyBERT kwmodel = KeyBERT('sentence-transformers/all-MiniLM-L6-v2')…
Rate quality
Private research annotation
Sign in to add a private research label or note.
- User
from keybert import KeyBERT
kw_model = KeyBERT('sentence-transformers/all-MiniLM-L6-v2')
sentences = [ """Thank you for calling me to see now for speaking. Can I assist you? I need access to a side, please. Glam key number? Charlie Papa 87. Charlie Papa 87. 87. Speaking to Leon. Leon, yeah. Side number? 353380. 353380. Side number three five double three eight oh three five double three eight oh, yeah, I'm going to the main listening. No, I'm saying how long? How long? Give us two hours, please. All right, you cannot make sure to close any of that. I'll do that. Thank you. All right, thank you. Bye. Bye-bye. """, """Thank you for calling me to see now for speaking. Can I assist you? I need access to a side, please. Glam key number? Charlie Papa 87. Charlie Papa 87. 87. Speaking to Leon. Leon, yeah. Side number? 353380. 353380. Side number three five double three eight oh three five double three eight oh, yeah, I'm going to the main listening. No, I'm saying how long? How long? Give us two hours, please. All right, you cannot make sure to close any of that. I'll do that. Thank you. All right, thank you. Bye. Bye-bye. """, """Thank you for calling it to see you through to Vivian. May I ask you? Hi Vivian, how are you? I'm good, thanks. How are you? I'm okay. Can you please help me with access please, Nana? Certainly. Can I have a site number, Victor? Site number, Victor? Hello? Yes, it's Victor from World Construction. Can I have a site number? Site number? 352612. Is it a secondary? Yes, it's my number. You you from rural we are all construction every ID it's a to zero and zero so the teacher in class how my country outside to come give us five hours access granted is anything I can accept it I think I appreciate you thank you so much enjoy your day you too well bye """ ]
for sentence in sentences: keywords = kw_model.extract_keywords(sentence, keyphrase_ngram_range=(1, 2), stop_words='english', top_n=10 ) print(f"Sentence: {sentence}") print("Keywords:", keywords) print()
this is my code and the outpu,
I want to add a bunch of stop word and shit dad shouldn;t be cossidered al lthese sentences the keyord I actually want to be extracted is access"
- Assistant