Skip to main content

Lightweight AI library for pattern recognition and text classification

Project description

Hi I'm Ehsan Saeedi the creator of this library from Iran. for more details visit https://pixelai-net.ir/patternmind

and also here is a simple sample:

import patternmind as pm

models = []
inputs = ["how much is 5 plus 2","how much is 50 plus 20","how much is 500 plus 200"]
outputs = [" 5 + 2"," 50 + 20"," 500 + 200"]
model = pm.p_train(inputs,outputs)
models.append(model)
inputs = ["say 14","say iran","say ehsan saeedi"]
outputs = ["ok. 14","ok. iran","ok. ehsan saeedi"]
model = pm.p_train(inputs,outputs)
models.append(model)
prompts = ["say love is good","how much is 52 plus 91"]
for prompt in prompts:
	position = pm.p_find(models,prompt)
	try:
		print(eval(pm.p_result(prompt,models[position])["result"]))
	except:
		print(pm.p_result(prompt,models[position])["result"])

a1 = "i love iran"
a2 = "i hate iran"
print(pm.similarity(a1,a2)["percent"])

inputs = ["i hate you","i damn you","i kill you","i love you","i want you","i like you"]
outputs = ["-","-","-","+","+","+"]
model = pm.n_train(inputs,outputs)
prompt = "we love him"
print(pm.n_result(prompt,model)["tag"])

inputs = ["i love you","i love him","i hate it","i hate her"]
sim = 0.7
print(pm.partit(inputs,sim)["parts"])

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

patternmind-1.0.0.tar.gz (3.8 kB view details)

Uploaded Source

Built Distribution

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

patternmind-1.0.0-py3-none-any.whl (4.1 kB view details)

Uploaded Python 3

File details

Details for the file patternmind-1.0.0.tar.gz.

File metadata

  • Download URL: patternmind-1.0.0.tar.gz
  • Upload date:
  • Size: 3.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.2

File hashes

Hashes for patternmind-1.0.0.tar.gz
Algorithm Hash digest
SHA256 444d90d1a4f055e4d33aed4f9102fa9679eaffd5d96781846e516af5300df9f1
MD5 2f4f6a86d5568915d39665507386c8c5
BLAKE2b-256 ec05d421d19dd028328e4b29e69ea5aebc715797a99e3c167486e82e122044a8

See more details on using hashes here.

File details

Details for the file patternmind-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: patternmind-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 4.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.2

File hashes

Hashes for patternmind-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ac69df1d2bd5985c2d9a2bd9df97cb704334ff48b8bd15d3ae8a93bef15c29f9
MD5 5e3cbaa6fd1e720ffe990464e6247b28
BLAKE2b-256 687c1c2715ba4b72316e2c3990145c0c7fe77323ad033670941cb09b30966514

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