Compare commits
3 commits
2ac269d7f8
...
d38345c3d9
Author | SHA1 | Date | |
---|---|---|---|
d38345c3d9 | |||
9d9c9dcd34 | |||
3e1c3dac5b |
2 changed files with 20 additions and 2 deletions
|
@ -90,6 +90,21 @@ async def shut(self, c, n, m):
|
|||
await self.message(c, "Ok, il be back in 10 minutes")
|
||||
|
||||
|
||||
async def deleteword(self, c, n, m):
|
||||
starttime = time.time()
|
||||
deleteme = m.split()
|
||||
shared.db["conver"].delete(pre=deleteme)
|
||||
shared.db["prew"].delete(pre=deleteme)
|
||||
shared.db["conver"].delete(pro=deleteme)
|
||||
shared.db["prew"].delete(pro=deleteme)
|
||||
shared.db["noun"].delete(word=deleteme)
|
||||
shared.db["beg"].delete(word=deleteme)
|
||||
shared.db["end"].delete(word=deleteme)
|
||||
await self.message(
|
||||
c, f"word(s) deleted in {round(time.time()-starttime,2)} seconds"
|
||||
)
|
||||
|
||||
|
||||
async def schans(self, c, n, m):
|
||||
self.chandb.delete()
|
||||
for i in self.channels:
|
||||
|
@ -246,6 +261,7 @@ commands = {
|
|||
"send": send,
|
||||
"joins": joins,
|
||||
"shut": shut,
|
||||
"deleteword": deleteword,
|
||||
"schans": schans,
|
||||
"addalias": addalias,
|
||||
"addcommand": addcommand,
|
||||
|
|
|
@ -40,7 +40,7 @@ async def rec(self, m):
|
|||
),
|
||||
["id"],
|
||||
)
|
||||
noch.insert(dict(word=w))
|
||||
noch.insert(dict(word=get(words, w)))
|
||||
|
||||
|
||||
async def getNoun(self, words, c):
|
||||
|
@ -127,6 +127,8 @@ async def genOut(self, noun):
|
|||
elif coun >= shared.maxiter:
|
||||
shared.enmul -= 1
|
||||
|
||||
print(f"coun {coun} enmul {shared.enmul} maxiter {shared.maxiter}")
|
||||
|
||||
return out
|
||||
|
||||
|
||||
|
@ -172,7 +174,7 @@ async def init(self):
|
|||
# learning.
|
||||
shared.learndelay = 1
|
||||
# sentance ending weight, higher means longer sentances,
|
||||
# higher means shorter sentances. this will need to slowly
|
||||
# lower means shorter sentances. this will need to slowly
|
||||
# get larger as the database grows
|
||||
shared.enmul = 200
|
||||
shared.maxiter = 14
|
||||
|
|
Loading…
Reference in a new issue