2022-09-08
Calling Java From Python

using jpype or pyjnius

sample code for jpype:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
from jpype import *
import jpype.imports # this is needed! shit.
addClassPath("/root/Desktop/works/pyjom/tests/karaoke_effects/classpath/lingua.jar")
startJVM(getDefaultJVMPath())
java.lang.System.out.println("Calling Java Print from Python using Jpype!")
from com.github.pemistahl.lingua.api import *
# detector = LanguageDetectorBuilder.fromAllLanguages().withLowAccuracyMode().build()
detector = LanguageDetectorBuilder.fromAllLanguages().build() # 3.5GB just for detecting language! it is somehow crazy.
sample = 'hello world'
result = detector.detectLanguageOf(sample)
print(result, type(result)) # <java class 'com.github.pemistahl.lingua.api.Language'>
# but we can convert it into string.
strResult = str(result)
print(strResult, type(strResult))
import math
print("CALLING MATH: %d" % math.sqrt(4))
shutdownJVM()

sample for pyjnius:

1
2
3
4
5
6
7
8
9
10
11
12
13
import jnius_config
# jnius_config.add_options('-Xrs', '-Xmx4096')
jnius_config.set_classpath('.', "/root/Desktop/works/pyjom/tests/karaoke_effects/classpath/lingua.jar")
import jnius
jnius.autoclass('java.lang.System').out.println('Hello world')
detector = jnius.autoclass('com.github.pemistahl.lingua.api.LanguageDetectorBuilder').fromAllLanguages().build()
sample = 'hello world'
result = detector.detectLanguageOf(sample)
print(result, type(result))
# breakpoint()
strResult = result.toString()
print(strResult, type(strResult))

Read More

2022-07-14
Seo 蓝海词 竞争度

SEO 蓝海词 飙升词 竞争度 搜索人气 转化率 成交价(视频长度)

we need suggestion, related topics, also search results.

can be used in title generation.

title/message as query (-> keyword -> suggested query) -> search results -> extract response/title

suggestion, trending topics/keywords

black hat seo, https://www.blackhatworld.com/forums/black-hat-seo.28/

paste your link ‘elsewhere’, submit your link to search engine somehow, visit your link from search engine somehow

seo without website

write a blog on github?

create short links and submit them to search engine

get query count, perform n-gram analysis

https://www.aeripret.com/ngrams-analysis-seo/

https://www.pemavor.com/seo-keyword-clustering-with-python/

i have bookmarked links for further use on macbook chrome.

advertools is a professional SEO library, productivity & analysis tools to scale your online marketing

可以用分析股价的方法分析搜索关键词 其中股价对应搜索频率(实时) 播放量对应成交量(实时)也可能不对 反正这个模型肯定要先收集数据然后再建模 画k线 当然也不必完全拘泥于全盘还原 收集到的数据能反映实际情况 得到最优解 也就是发个视频预估播放量最大就行 用深度学习模型

寻找潜在爆款话题 标签

快排参数 上首页

https://github.com/sopify-bot/seo

分为主动点击 换IP点击

以及优化自身关键词 被动优化两种方式

蓝海词可以从零开始做 可以由现有词语延伸 可以寻找已有的蓝海词

蓝海词是产品关键词的一种,又被称为“零少词”、“长尾词”。具体是指前台具备一定买家搜索热度,但供应商发布产品较少,通常该词下对应的精确匹配产品数量不超过3页,因而同行竞争度较低的关键词。一旦供应商能准确使用这些词语,并能结合信息质量发布一条合格的产品信息,将获得曝光和点击的快速提升

红海泛指竞争相当激烈的市场。在红海中,产业边界是明晰和确定的,游戏的竞争规则是已知的。身处红海的企业试图表现得超过竞争对手,以攫取已知需求下的更大市场份额

淘宝标题撰写技巧:标题流量的3架马车,飙升词+蓝海词+销量卡位词

什么是飙升词?就是在短时间内热度迅速攀升,并且持续上升的词!

蓝海词就是那些搜索热度非常高,但这个词下面的在线产品却很少的词。

这种词可以让我们避免和红海大词竞争,获取很多隐藏流量!

淘宝界面除了能够综合排序之外,我们还能通过销量来排序。

关键词卡位就是 寻找点击量和你差不多的视频 商品所拥有的关键词语 标签 这样按照播放量排序的时候就会排到这些视频中间

Read More

2022-05-29
Essay Grading

Read More