Skip to main content
Donate to the Python Software Foundation or Purchase a PyCharm License to Benefit the PSF! Donate Now

My short description for my project.

Project description

sentence splitting and intent classification

intent classification

to split a paragraph into sentences, to classify the intent of a sentence, implement the following:

arr = classification.intent_splitting.split('来点舒缓一点的音乐然后开始导航')


result: [('来点舒缓一点的音乐', 'genre'), ('然后开始导航', 'navi')]

#the usage of bert_semantic: #retrieve qa pairs from solr: question, answer = most_similar(s) if question: user_question = [s] * len(question) similarity = bert_semantic.instance.predict(user_question, question)

            for sent, score in zip(question, similarity):
                print('%s / %s = %f\t%f' % (s, sent, score))

            index = similarity.argmax()
            print('highest score for bert semantic')
            print('%s / %s = %f' % (s, question[index], similarity[index]))
            print('answer = ', answer[index])
            question = question[index]
            answer = answer[index]
            similarity = similarity[index]

            if similarity >= thredshold:
            	return answer            

        return None

Project details

Release history Release notifications

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
cosmosnlp-5.2.0-py3-none-any.whl (2.5 kB) Copy SHA256 hash SHA256 Wheel py3
cosmosnlp-5.2.0.tar.gz (3.6 kB) Copy SHA256 hash SHA256 Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page