-
-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FEATURE REQUEST] - Detecting other languages #50
Comments
It's possible but i don't have a template in these languages. And google translate dont work perfect with russian and korean |
well its always starting with 안녕하세요 and Здравствуйте which means Hi/Hello. so why not just detecting those? |
The issue is not only about starting letters, it needs to be sliced into groups. For example when slicing english message you need something like this: "^(.\s)?(.+): (.+ to buy your\s+?(.+?)(\s+?listed for\s+?([\d\.]+?)\s+?(.+))?\s+?in\s+?(.+?)\s+?\(stash tab "(.)"; position: left (\d+), top (\d+)\)\s*?(.*))$" |
I did started some work on it few weeks ago and made this: ^(.\s)?(.+): (안녕하세요, (.+?)\s(보관함 탭 "(.)", 위치: 왼쪽 (\d+), 상단 (\d+))에\s+?([\d.])\s*(.)\s(으)로 올려놓은\s*(.)을(를) 구매하고 싶습니다\s(.*))$ but it's not working properly yet :/ It's just a lot of work with translations etc. |
In case it helps, here's some more language samples:
|
hopefully you can do this, cause right now its like 70%+ trades are not from english ppl :( but otherwise its the best one! |
@queicherius That will be extremely helpful. Thank you for your contribution |
@Morph21 Hi there! I might help you tremendously! You can find every (not item) name in the official trade site by changing your language in the right top and go to https://de.pathofexile.com/trade/about For korean numbers I would suggest searching up the numbers https://en.wikipedia.org/wiki/Korean_numerals Doing everything yourself would be a pain in the ass better filter through a HTTP request and the position where which name the item has for incoming whispers!
|
Looking at the poe api responses can give some clues. Here is one in korean: {
"id": "55bdecf0bec0c8ace913089aa23cb39d21f3a3b4d71fe101600c0a7fd44410f0",
"listing": {
"method": "psapi",
"indexed": "2021-05-04T16:35:35Z",
"stash": {
"name": "판매",
"x": 1,
"y": 4
},
"whisper": "@해그톡식 안녕하세요, 결전(보관함 탭 \"판매\", 위치: 왼쪽 2, 상단 5)에 7 exalted(으)로 올려놓은 레벨 5 23% 각성한 치명적인 상태 이상 보조(을)를 구매하고 싶습니다",
"account": {
"name": "chang_2",
"lastCharacterName": "해그톡식",
"online": null,
"language": "ko_KR"
},
"price": {
"type": "~price",
"amount": 7,
"currency": "exalted"
}
},
"item": {
"verified": true,
"w": 1,
"h": 1,
"icon": "https://web.poecdn.com/image/Art/2DItems/Gems/Support/SupportPlus/DeadlyAilmentsPlus.png?v=270f401a324ca772e6e2d3c4abca8c1b&w=1&h=1&scale=1",
"support": true,
"league": "Ultimatum",
"id": "55bdecf0bec0c8ace913089aa23cb39d21f3a3b4d71fe101600c0a7fd44410f0",
"name": "",
"typeLine": "Awakened Deadly Ailments Support",
"baseType": "Awakened Deadly Ailments Support",
"identified": true,
"ilvl": 0,
"note": "~price 7 exalted",
"corrupted": true,
"properties": [
{
"name": "Support",
"values": [],
"displayMode": 0
},
{
"name": "Level",
"values": [
[
"5 (Max)",
0
]
],
"displayMode": 0,
"type": 5
},
{
"name": "Cost & Reservation Multiplier",
"values": [
[
"130%",
0
]
],
"displayMode": 0
},
{
"name": "Quality",
"values": [
[
"+23%",
1
]
],
"displayMode": 0,
"type": 6
}
],
"requirements": [
{
"name": "Level",
"values": [
[
"80",
0
]
],
"displayMode": 0
},
{
"name": "Dex",
"values": [
[
"79",
0
]
],
"displayMode": 1
},
{
"name": "Int",
"values": [
[
"55",
0
]
],
"displayMode": 1
}
],
"secDescrText": "Supports any skill that hits enemies.",
"explicitMods": [
"Supported Skills deal 69% more Damage with Ailments",
"Supported Skills deal 10% less Damage with Hits",
"Supported Skills deal 11% increased Damage over Time",
"Damaging Ailments inflicted with Supported Skills deal damage 12% faster"
],
"descrText": "This is a Support Gem. It does not grant a bonus to your character, but to skills in sockets connected to it. Place into an item socket connected to a socket containing the Active Skill Gem you wish to augment. Right click to remove from a socket.",
"frameType": 4,
"extended": {
"text": "SXRlbSBDbGFzczogU3VwcG9ydCBTa2lsbCBHZW1zDQpSYXJpdHk6IEdlbQ0KQXdha2VuZWQgRGVhZGx5IEF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ash tab name, which is What is missing is to find and translate the item names. |
I created a junit test for different languages. It can be improved with more samples and languages. |
…ller parsers The MessageParser was getting big, and looked like it could use the "strategy pattern". So it is now split into one parser per language and trade site. They can each be individually tested, which is a plus. Relates to Morph21#50
I did some work on the regex parsing. It should work for Russian and Korean. I need some more trade samples for Thai, but I rarely see Thai trades now anyways. The item names are not translated yet. This means the notifications would show e.g. Korean names for items. |
I got multiple different trades for the same language, and compared them to see what differed. To find the league names, I used the flag-icon in the top right to visit different pathofexile.com trade sites, and copied the text from the league selection dropdown. |
Here are two Russian currency trades:
German item trades:
A Thai item trade:
A spanish item trade:
A french skill gem trade:
|
Hi,
is it possible to add support for detecting other language like Russian, Chinese etc when using whisper feature on pathofexile trade website?
so msges like this one:
@Трейнгар Здравствуйте, хочу купить у вас Табула раса Матерчатая безрукавка за 6 chaos в лиге Ритуал (секция "Trade"; позиция: 3 столбец, 2 ряд)
or this one:
@캐릭명좆같네 안녕하세요, 의식(보관함 탭 "거래", 위치: 왼쪽 11, 상단 1)에 6 chaos(으)로 올려놓은 타뷸라 라사(Tabula Rasa) 단순한 로브(을)를 구매하고 싶습니다
are properly detected as trade messages and pasted into game?
thanks!
btw good job on this "addon"
The text was updated successfully, but these errors were encountered: