SPARQL - Query any information of things in DBpedia - sparql

I would like to find description of specific things without knowing whether the things are Thing, Person, Place, Location, etc.
I wonder If I am able to do so in DBpedia?
Eg:
Search: Manchester United.
Query Result: Manchester United Football Club, commonly known as Man. And so on....
Search: Maldives.
Query Result: The Maldives is a tropical nation in the Indian Ocean composed of 26 ring-shaped atolls. And so on....

I suggest you check out the Faceted Browser, a feature of Virtuoso, which powers the public DBpedia endpoints.
Search on "Manchester United".
Have an idea what type the entity you're looking for is? Click "Type" in the right-hand link list.
Explore as you will... Eventually you'll find a page that seems useful.
a. Want to save that page for later? Click "Permalink" and copy the full link from the address box -- or just right-click "Permalink" and choose "copy link" from the contextual menu -- or bookmark the "Permalink".
b. Want to edit that query to build your own? Try "View query as SPARQL".

Related

Searching a word on all fields of an index with solr 8.9

I'm fetching some datas from a sql database using the DIH of Solr. I created a field all as this :
and I would like to be able to use it to search on all fields thought it. so like if I do he query "John" it would match with a title and a author name.
Actually I have a problem, when I do a query on the all field it only works on a perfect match.
For exemple, if I search name:lub it returns
"name":"CR2/LUB/ Lub oil pump",
"all":["1706443412665794562",
"2165C92A-D107-48A6-A410-08D92AA77517",
"CR2/BER/CRACK/LUB/OT/10-PU-200C",
"CR2/LUB/ Lub oil pump"],
Which is good
But if I search all:lub the response show :
"numFound":0,"start":0,"numFoundExact":true,"docs.
The ultimate goal being to be able to use a word to search on all fields, and to ponderate the weight of the different fields.
Like, if someone search John for books it finds it in the title , and in the author fields (by looking in the all) and then ponderate, by making the title more important and viewing in the response the score of each document
Thanks in advance for your advice!

aws Cloud search - short query

In my cloud search document I have list of persons I want to search in. Now, let's say there are a people with name David, Dan and Dennis. Everything works alright when I query full name (for example: David) - I get back all the persons with the name David. But what if I want to return all persons who's name starts with Da (so cloud search will leturn David, Dan and Dennis)? Is it possible to achieve this behaviour?
For context: I am building an application where user can search people by name (and some other attributes) and I don't want the user to have to type the full name of person to find...
Oh I found it. I need to use text prefiex:
https://docs.aws.amazon.com/cloudsearch/latest/developerguide/searching-text.html#searching-text-prefixes

Restrict Google Places API search by type

I am performing a query using Google Places API to search for local restaurants
https://maps.googleapis.com/maps/api/place/nearbysearch/json?location=..lat,..lon&radius=..radius&type=restaurant&key=..key
However, I am receiving a lot of results for locations that are not primarily restaurants, for example:
Popular hotels with restaurants
Food delivery services
Night clubs
Department stores with dining
etc.
Ideally I would like to restrict my query to only a few types or prohibit certain types by query. Otherwise I would need to do this manually or find another service.
Just add the city name as a prefix in the search string. It will only give the search suggestions in which the user is searching.
eg, pass "NewYork" as a prefix in your search string, now type any word, it will only give you results for NewYork city restaurant, cafes, places, etc

Get outlook organisation team hierarchy using vba

I have a list of staff emails in an Excel sheet and I'm trying to retrieve users' organisational team hierarchy using VBA. The output I am after is like the following:
Email address, Team Hierarchy
aaa#email.com, Team 1\Team 2\Team 3\Team 4
bbb#email.com, Team 1\Team 5\Team 6\Team 7
I've seen that team hierarchy information is readily shown in Outlook (right-click contact -> Properties -> General tab -> Organisation field). So I think there should be a way to retrieve this information to a spreadsheet using VBA, but couldn't find a way to do it.
I did some research and saw that using LDAP there are ways to get the basic information directly from Active Directory such as First name, Last name, Org unit (team), etc., but couldn't find a way to get the team hierarchical view.
Appreciate if someone can help!
Cheers!
Use ExchangeUser.GetDirectReports and GetExchangeUserManager methods.
ExchangeUser can be retrieved from AddressEntry.GetExchangeUser.

Using LIKE in SQL Server to identify strings

I am writing a program that performs operations on a database of Football matches and data. One of the issues that I have is that my source data does not have consistent naming of each Team. So Leyton Orient could appear as L Orient. Most of the time this team is listed as L Orient. So I need to find the closest match to a team name when it does not appear in the database team name list exactly as it appears in the data that I am importing. Currently in my database I have a table 'Team' with a data sample as follows:
TeamID TeamName TeamLocation
1 Arsenal England
2 Aston Villa England
3 L Orient England
If the name 'Leyton Orient' appears in the data being imported I need to match this to L Orient and get the TeamID 3. My question is, can I use the LIKE function to achieve this in a case where the team name is longer than the name in the database?
I have figured out that if I had 'Leyton Orient' in the table and was importing 'L Orient' I could locate the correct entry with:
SELECT TeamName FROM Team WHERE TeamName LIKE '%l%orient%';
But can I do it the other way around? Also, I could have an example like Manchester United and I want to import Man Utd. I could find this by putting a % sign between every character like this:
SELECT TeamName FROM Team WHERE TeamName LIKE '%M%a%n%U%t%d%';
But is there a better way?
Finally, and this might be better put in another question, I would like not to have to search for the correct team when the way a team is named is repeated, i.e. I would like to store alternative spellings/aliases for teams in order to find the correct team entry quickly. Can anybody advise on how I might approach this? Thanks
The solution you are looking for is the FULL TEXT SEARCH, it'll require your DBA to create a full text index, however, once there you can perform much more powerful searches than just character pattern matching.
As the others have suggested, you could also just have an Alias table, which contains all possible forms of a team name and reference that. depending on how your search is working, that may well be the path of least resistance.
Finally, and this might be better put in another question, I would like not to have to search for the correct team when the way a team is named is repeated, i.e. I would like to store alternative spellings/aliases for teams in order to find the correct team entry quickly. Can anybody advise on how I might approach this? Thank
I would personally have a team table and a teamalias table. Use relationships to marry them up.
I believe the best way to prevent this, is to have a list of teams names displayed in a dropdown list. This will also let you drop validation for the team name. The users can now only choose one set team name and will also make it much easier for you working in your database. then you can look for the exact team name as it appears in your database. i.e.:
SELECT TeamName FROM Team WHERE TeamName = [dropdownlist_name];