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.3.tar.gz (8.3 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.3-py3-none-any.whl (8.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pipowl-1.4.3.tar.gz
  • Upload date:
  • Size: 8.3 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.3.tar.gz
Algorithm Hash digest
SHA256 c8f8fa87001d1c25162aac432b699e56f512ff05d8ccd9c3f70aab8cbe29d635
MD5 e0d62dba90e8d9e2327ca0bc434493c0
BLAKE2b-256 610c09ca28e96f18f68b86583d801b79a1a944a77afda223fec5d7130fbc1dbd

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pipowl-1.4.3-py3-none-any.whl
  • Upload date:
  • Size: 8.5 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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 d3deed9a52ace80a261dfe3b2b47ef9780643c3f88fbd7a563eba2f5c33421ae
MD5 1e771eb1043b5189ab2e9e3fcedaee42
BLAKE2b-256 fba58e503f4ec2480314f2843dea97a2d0bbbbb5e75911c1f9c48f6e0d1cacc8

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