I would like to use Schema.org for JobPosting, but the offer is for different cities (jobLocation).
Can I mark 2-3 cities in this schema (with JSON-LD)? In that case, how?
According to Google: https://developers.google.com/search/docs/data-types/job-postings#definitions
If the job has multiple locations, add multiple jobLocation properties
in an array. Google will choose the best location to display based on
the job seeker's query.
In json+ld it would look something like:
"jobLocation":[
{
"#type":"Place",
"address":{
"#type":"PostalAddress",
"streetAddress": "555 Clancy St",
"addressLocality":"Chicago",
"addressRegion":"IL",
"postalCode": "48201",
}
},
{
"#type":"Place",
"address":{
"#type":"PostalAddress",
"streetAddress": "5 Main St",
"addressLocality":"San Francisco",
"addressRegion":"CA",
"postalCode": "48212",
}
}
]
The jobLocation property, like any property, can have multiple values. In JSON-LD, you have to use an array (see example).
But the question is what multiple values mean for this jobLocation property: do these represent all locations the person has to work in (AND), or do these represent alternatives and the person can choose (OR)?
Neither Schema.org nor JSON-LD offer a way for the author to disambiguate which one is meant.
In my opinion, multiple values should convey that the person has to work in all these places (AND). Why? Because otherwise there would be no way to convey this. If multiple locations would represent alternatives (OR), you can simply provide multiple JobPosting items (one for each location).
Related
I have these two URLs:
https://euw1.api.riotgames.com/lol/summoner/v4/summoners/by-name/okusen
https://eun1.api.riotgames.com/lol/summoner/v4/summoners/by-name/okusen
They just have the same player name and they are two different players from two different regions (Europe West and Europe Nordic & East).
Then, the two JSON responses respectively:
{
"profileIconId": 4275,
"name": "Okusen",
"puuid": "KFM4xJBwzy7T-rytrj9J8lGx0QduGLsBJ-WY9xdx4Q9cZNvxXCSNv_k4YQdfPgQjS52ppwlO_f9vhA",
"summonerLevel": 121,
"accountId": "PsopchdPCOnlQJB4AjXZ6TCrHuEZ9JlMqZMrDP6iAtznGQ",
"id": "zYkVlVUGHDuDmbfo1lmU0neHdpQdqxBNJ-hHMunqC__2K-4",
"revisionDate": 1583882906000
}
{
"profileIconId": 25,
"name": "Okusen",
"puuid": "KFM4xJBwzy7T-rytrj9J8lGx0QduGLsBJ-WY9xdx4Q9cZNvxXCSNv_k4YQdfPgQjS52ppwlO_f9vhA",
"summonerLevel": 30,
"accountId": "PsopchdPCOnlQJB4AjXZ6TCrHuEZ9JlMqZMrDP6iAtznGQ",
"id": "zYkVlVUGHDuDmbfo1lmU0neHdpQdqxBNJ-hHMunqC__2K-4",
"revisionDate": 1495766289000
}
They have the same identifiers so this is incorrect. I need puuid, accountId or id as parameter in other requests in order to get data for a specific player but I can't do that correctly if I don't have the correct identifier.
LoLCHESS.GG does not seem to have this problem as they display different data for these two players so I probably miss something but I really don't know what.
Neither of those IDs are guaranteed to be unique.
summonerId and accountId are guaranteed to be unique on a per region basis (so we won't find two summoners with the same ID on EUW).
puuid is guaranteed to be unique globally but if a user transfers regions, the two accounts will have the same puuid.
Thanks to thomasmarton in GitHub, more details in this thread.
I'm developing this Achievement System and it must have a CRUD, that admins access to create new achievements and it's rules. I need some help with the design & algorithm of this so it can easily evolve with new rules as admins ask.
Rules sample
Medal one: must complete 5 any courses with a score of at least 90
Medal two: must complete two specific courses with a score of at least 85
Medal three: must be top 5 in general ranking at least once
Medal four: must have more than 5000 points
I'll basically store that as metadata in a relational database, probably with these columns below:
action
action quantity
course quantity
score
id course
ranking
position
points
I want to know if there is any known algorithm / design to this kind of problem? Or perhaps I should store them differently to make it easier? Don't know, I want suggestions.
Your doubts may be right. In my opinion, a database is the wrong way to organize this data. Every new kind of achievement you want to create would add extra columns to your database, and most achievements wouldn't use most of the columns. A more flexible data structure, one that doesn't expect for every entry to use all of the possible achievement criteria at once by default, would probably be more useful. Most languages support JSON, so I suggest you use that. The structure could be something like this:
[
{
"name": "Medal One",
"requirements": {
"coursesCompleted": 5,
"scoreMin": 90
}
},
{
"name": "Medal Two",
"requirements": {
"specificCoursesCompleted": [
"Course 1",
"Course 2"
],
"scoreMin": 85
}
},
{
"name": "Medal Three",
"requirements": {
"generalRankingMin": 5
}
},
{
"name": "Medal Four",
"requirements": {
"scoreMin": 5000
}
}
]
You can see here how the criteria types are sometimes reused, but they can be omitted when not needed and new ones can be added to a few achievements without bloating the rest of the dataset as well.
PS: I made the criteria names very verbose for demonstration purposes; shortening them or not in actual use is up to preference.
i have tried to find anything about my problem online but unfortunately i had no luck finding anything that would help me.
i have a custom javascript map built with mapbox-gl-js.
the map shows real estate objects which can be filtered by country, city etc. using a custom built filter bar. now on this filter bar there are dropdown fields and two input fields. the filters i built for the dropdown fields work just fine. in the code use equal-to-comparsions for this task.
the two input fields are there to filter the maximum price and a minimum square meters - here i use the less or equal than and greater or equal than comparsion filters.
for some reason these two filter's won't work as desired. for example if i filter for objects with max price 1000000 objects with greater price still show.
this is how my filter would look like in JSON:
["all",["<=","preis",1000000]]
this is how the features look like:
feature = {
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [...]
},
"properties": {
[...],
"preis": 20000000,
[...]
}
}
i have also tried to reproduce this in a simple test map with simple objects - there the problem also exists.
does anyone have a clue why this is acting up on me or has anyone had or got an familiar issue?
thanks and br, John
I am newbie in Solr. I want to add a custom comparatorClass in Solr. I also need to use fields - term and count in my custom class which I have defined in my schema.xml.
Structure of indexing document :
"docs": [
{
"count": 98,
"term": "age",
},
{
"count": 6,
"term": "age assan",
},
{
"count": 5,
"term": "age but",
},
{
"count": 10,
"term": "age salman",
}]
I have stored ngrams with term and their count but solr gives frequency by own that I don't need. I want my count frequency which I have defined for each term. And that term and count, I need to use and want to sort with frequency(count) and then edit distance which I need to implement by creating own class in comparator class or there is something else which helps me. Please share..
How can I do this. Any help please.
Thanks.
You should be able to do this without implementing a custom similarity class. The first requirement is (from your description) a straight forward sort on the count value, while the latter can be implemented by sorting on the value from the strdist() function. You can also multiply or weight these values against each other in a single sort statement by using several functions.
If you really, really need to build your own scorer (which I don't think you need to do from your description) - these are usually written to explore other ranking algorithms than tf/idf, bm25 etc. for larger corpuses, a search on Google gives you many resources with pre-made, easy to adopt solutions. I particularly want to point out "This is the Nuclear Option" in Build Your Own Custom Lucene Query and Scorer:
Unless you just want the educational experience, building a custom Lucene Query should be the “nuclear option” for search relevancy. It’s very fiddly and there are many ins-and-outs. If you’re actually considering this to solve a real problem, you’ve already gone down the following paths [...]
I am using LUIS to determine which state a customer lives in. I have set up a list entity called "state" that has the 50 states with their two-letter abbreviations as synonyms as described in the documentation. LUIS is returning certain two letter words, such as "hi" or "in" as state entities.
I have set up an intent with phrases such as "My state is Oregon", "I am from WA", etc. Inside the intent, if the word "in" is included in the utterance, for example in the utterance "I live in Kentucky", the word "in" is marked automatically by LUIS as a state entity and I am unable to remove that marker.
Below is a snip of the LUIS json response to the utterance "I live in Kentucky". As you can see, the response includes both Indiana and Kentucky as entities when there should only be Kentucky.
"query": "I live in Kentucky",
"topScoringIntent": {
"intent": "STATE_INQUIRY",
"score": 0.9338141
},
....
"entities": [
....
{
"entity": "in",
"type": "state",
"startIndex": 7,
"endIndex": 8,
"resolution": {
"values": [
"indiana"
]
}
},
{
"entity": "kentucky",
"type": "state",
"startIndex": 10,
"endIndex": 17,
"resolution": {
"values": [
"kentucky"
]
}
}
], ....
How do I train LUIS not to mark the words "in" and "hi" in this context as states if I can't remove the intent marker from the utterance?
In this particular case (populating a list entity with state abbvreviations/names), you would be better served using the geographyV2 prebuilt entity or Places.AbsoluteLocation prebuilt domain entity. (Please note that at the time of this writing, the geographyV2 prebuilt entity has a slight bug, so using the prebuilt domain entity would be the better option).
The reason for this is two-fold:
One, geographic locations are already baked into LUIS and they don't collide with regular syntactic words like "in", "hi", or "me". I tested this in reverse by creating a [Medical] list that contained "ct" as the normalized value and "ct scan" as a synonym. When I typed "get me a ct in CT" it resulted in "get me a [Medical] in [Medical]". To fix, I selected the second "CT" value and re-assigned it to the Places.AbsoluteLocation entity. After retraining, I tested "when in CT show me ct options" which correctly resulted in "when in [Places.AbsoluteLocation] show me [Medical] options". Further examples and training will refine the results.
Two, lists work well for words that have disparate words that can reference one. This tutorial shows a simple example where loosely associated words are assigned as synonyms to a canonical name (normalized value).
Hope of help!
#StevenKanberg's answer was very helpful but unfortunately not complete for my situation. I tried to implement both geographyV2 and Places.AbsoluteLocation (separately). Neither one works entirely in the way I need it to (recognizing states and their two-letter abbrevs in a way that can be queried from the entities in the response).
So my choices are:
Create my own list of states, using the state name and the two-letter abbrev as synonyms, as described in the list description itself. This works except for two letter abbrevs that are also words, such as "in", "hi" and "me".
Use geographyV2 prebuilt which does not allow synonyms and does not recognize two-letter abbrevs at all, or
Use Places.AbsoluteLocation which does recognize two-letter abbrevs for states, does not confuse them with words, but also grabs all locations including cities, countries and addresses and does not differentiate between them so I have no way of parsing which entity is the state in an utterance like "I live in Lake Stevens, Snohomish County, WA".
Solution: If I combine 1 with 3, I can query for entities that have both of those types. If LUIS marks the word "in" as a state (Indiana), I can then check to see if that word has also been flagged as an AbsoluteLocation. If it has not, then I can safely discard that entity. It's not ideal but is a workaround that solves the problem.