Skip to main content

SemanticOwl + LightOwl + LangOwl open-core

Project description

pipowl:Open Semantic Tools for Python

SemanticOwl + LightOwl + LangOwl Open-Core

pipowl 提供:

SemanticOwl:輕量語意編碼器(使用 SentenceTransformer)

LightOwl:基本文本清洗

LangOwl:語意搜尋(top-k + cosine similarity)

pip install:

pip install pipowl

使用:

① 先把 LangOwl 叫出來(像叫一隻貓頭鷹出來)

from pipowl.lang import LangOwl

lang = LangOwl()

② 準備一些句子(要比對的清單)

corpus = [ "我今天真的好累", "我覺得今天狀態不太好", "今天的天氣真的很好", ]

③ 比對:丟一句話進去,看哪句最像

results = lang.topk("我今天真的很想睡覺,因為工作太累了", corpus)

④ 把比對結果印出來(分數 + 句子)

for text, score in results: print(score, text)

總結: pipowl 是一個用來比較句子語意相似度的小工具。 你只要給它兩個東西:

  1. 你的句子(要查的)
  2. 你有的一堆句子(要比的)

它就會告訴你「哪一句最像」。

輸出示例:

0.903 我今天真的好累 0.882 我覺得今天狀態不太好 0.834 今天的天氣真的很好

請試試看:

py -m examples.quickstart

Project details


Download files

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

Source Distribution

pipowl-1.4.4.tar.gz (6.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pipowl-1.4.4-py3-none-any.whl (5.6 kB view details)

Uploaded Python 3

File details

Details for the file pipowl-1.4.4.tar.gz.

File metadata

  • Download URL: pipowl-1.4.4.tar.gz
  • Upload date:
  • Size: 6.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for pipowl-1.4.4.tar.gz
Algorithm Hash digest
SHA256 15edb85f87b0e1196228bce8f7b8eb420b829f659ab63b9bf73b86b43a005e1a
MD5 6a458e3a2eced5cc94802cdcd4626265
BLAKE2b-256 ade23b2bbc74a620000760e843e4e1a0ddb4c9cc1cea7e3e2fb5bba6029bcfec

See more details on using hashes here.

File details

Details for the file pipowl-1.4.4-py3-none-any.whl.

File metadata

  • Download URL: pipowl-1.4.4-py3-none-any.whl
  • Upload date:
  • Size: 5.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for pipowl-1.4.4-py3-none-any.whl
Algorithm Hash digest
SHA256 01bd5556393f1a58aefac5976c0b77006a4f23b1890dd7a144f24e5425353861
MD5 17f1122fcd7f14d208970d662fa52181
BLAKE2b-256 69d65814595b4e34937ad0fdd9251b47663a4c9c7dd1d4fb8019bd3b2f193500

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page