Example #1
0
def pairFinder(a, b):
    # nope. remove these things.
    fi = lambda x: list(
        map(lambda z: z[1], list(filter(lambda y: y[0], grouper(x)))))
    a0, b0 = fi(a), fi(b)
    # print(a0,b0)
    l, l0, l1 = len(a0), len(b0), 0
    if l == l0:
        for x in range(l):
            if a0[x] != b0[x]:
                l1 += 1
        if l1 == 1:
            return True
        else:
            return False
    else:
        return False


r = returnAList()["control"]
# sequential finder. -1
r0 = getBatch(r)
# print(r0)
# have name directly.
r1 = {
    x: [y for y in r if pairFinder(r0[r.index(x)], r0[r.index(y)])]
    for x in r
}
storeList(r1)
print(r1)
Example #2
0
# 14165
from getFromPickleR import returnAList
prefix = "../../multilingual/rockstar/"
lister = returnAList()
limbo = (lambda x: reversed(x[:-1] + ["unicode-table-data"]))
lamb = (lambda x: "/".join(x))


#for x in lister:
def f****e(x):
    limp = list(limbo(lister[x]))
    return prefix + lamb(limp), limp
Example #3
0
from getFromPickleR import returnAList
import continuality
from simpleStorageR import storeList
# r = returnFuck()
# for x in r:
#   print(x)
# so what?
r, rx = returnAList(), []
# onehot model?
# iterate over dics?
# -> (None,"str")?
# better get the core of things.
for x in r:
  f = [y for y in x]
  f0 = continuality.Faith([x[z] for z in f]).set()
  rx.append({z: [r0 for r0 in f if x[r0] == z] for z in f0}) # abstraction needed.
storeList(rx)
  # print(f1)
  # print("________________________________________________________________")
  # we have a translator.
Example #4
0
# f*****g shit.
# [['subdue', ['startId', 'startType', 'endId', 'endType', 'relationType']], ['groupAllChars', ['mainId', 'charGroup']], ['firstAssignment', ['charGroup']]]
from getFromPickleR import returnAList
from term0 import executeCode
from constructor import finalPro
fuckYou = returnAList()


def forMotherRussia(numToKill, superRats):
    shitFuck = fuckYou[numToKill]
    #    print(shitFuck)
    #    print(superRats)
    return finalPro(shitFuck, superRats)


def toyProject(numToKill, superRats):
    try:
        executeCode(forMotherRussia(numToKill, superRats))
        print("--e*********n successful--")
    except:
        print("--stuck in testicles--")


# f*****g pricks.
'''print(forMotherRussia(0,[1,"asia",2,"f**k","shit"]))
print(forMotherRussia(1,[23,"f**k"]))
print(forMotherRussia(2,["fuckA_SUV"]))'''
Example #5
0
# import unicode_charnames as uc
import jieba
# use stack?
from getFromPickleR import returnAList
import unicode_charnames as uc
# import wordninja as wj
xfz = list(filter(lambda x: len(x) > 0, returnAList()['stopword']))
xf0 = [x for x in xfz if "CJK" in uc.charname(x[0])]
xf1 = [x for x in xfz if x not in xf0]

def getBatch(a):
  return [uc.charname(x) for x in a]

def checkMe(a):
  if len(a)>6:
    if len(list(set(a)))==1:
      return True
  return False

def checker(a):
  if "DIGIT" in a:
    return 1
  else:
    return 0

# def wrapper(a,b):
#   # j=lambda x: [z for y in x for z in y]
#   if b==True:
#     return list(jieba.cut(a))
#   else:
#     return wj.split(a)
Example #6
0
import jieba
from getFromPickleR import returnAList

txt = open("santi.txt", encoding="utf-8").read()
#加载停用词表
# stopwords = [line.strip() for line in open("CS.txt",encoding="utf-8").readlines()]
stopwords = returnAList()['stopword']
words = jieba.lcut(txt)
counts = {}
for word in words:
    #不在停用词表中
    if word not in stopwords:
        #不统计字数为一的词
        if len(word) == 1:
            continue
        else:
            counts[word] = counts.get(word, 0) + 1
items, i0 = list(counts.items()), True
items.sort(key=lambda x: x[1], reverse=True)
for i in range(len(items)):
    if i0:
        word, count = items[i]
        if count < 20:
            i0 = False
        print("{:<10}{:>7}".format(word, count))
    else:
        break
Example #7
0
import jieba
from getFromPickleR import returnAList
from simpleStorageR import storeFuck
txt = open("all.txt", encoding="utf-8").read()
#加载停用词表
# stopwords = [line.strip() for line in open("CS.txt",encoding="utf-8").readlines()]  
stopword = returnAList()
stopwords=stopword['stopword']+stopword['control']
words  = jieba.cut(txt)
counts = {}  
for word in words:
    #不在停用词表中
    if word not in stopwords:
        #不统计字数为一的词
        if len(word)>1:
            counts[word] = counts.get(word,0) + 1
items,i0 = list(counts.items()),True
items.sort(key=lambda x:x[1], reverse=True)
i0=items[0]
i1=i0[1]
i2=i1**0.33
i3=i2**2
i4,i5,i6,i7,i8=list(map(int,[i3,i2])),0,[],len(items),{"tags":[],"relationships":[]}
for fm in i4:
  for i in range(i5,i7+1):
    if items[i][1]<=fm:
      i5=fm+1
      i6.append(i)
      break
i8["tags"]=items[:i6[0]]
i8["relationships"]=items[i6[0]:i6[1]]
Example #8
0
from getFromPickleR import returnAList

r = returnAList()
r0 = list(r.keys())
# print(r0)
for x in r0:
    r1 = r[x].lower()
    if "character" in r1 or "unicode" in r1:
        print(x)
        # print(r[x])