Protege; infer that if two apartments are located in the same address, then they are in the same building - object

I am pretty new at building ontologies in Protege. I am doing a simplified real estate ontology. I have an object property called "isLocatedIn" (actually my ontology is in spanish, so that is not the real name, but lets keep it simple) with domain RealEstate and range RealEstate or Address. You can say that an Apartment "isLocatedIn some Address" or that IsLocatedIn some RealEstate (in this last case it should be an apartment building.
What i want is the reasoner to infer that if a building and an apartment are located in the same address, then the apartment is located in the same address. It sounds as simple as transitivity, but it actually does not work.
Another thing i would like to know is if i can do a DL query that returns builings that are in the same address, i can figure it, it should be easy to say something like Buildings and isLocatedIn some Self.Address or something like that, or chaining objectproperties to the point to reach Self, something like Buildings and isLocatedIn o inverse(isLocatedIn) some Self.
Im not sure if i can explain what i want to do
Thanks in advance.

I already find a way to do it using SWRL rules. I thing there might be another way around using property chains, but i didnt go deep into it.
The way i did it required to install a plugin to work with SWRL rules and then go to Windows -> Tabs and select SWRL tab.
Then it is pretty easy, just some google to see the syntax and edit some premade googled rules.

Related

Smart search for acronyms in Salesforce

In Salesforce's Service Cloud one can enable the out of the box search function where the user enters a term and the system searches all parts of the database for a match. I would like to enable smart searching of acronyms so that if I spell an organizations name the search functionality will also search for associated acronyms in the database. For example, if I search type in American Automobile Association, I would also get results that contain both "American Automobile Association" and "AAA".
I imagine such a script would involve declaring that if the term being searched contains one or more spaces or periods, take the first letter of the first word and concatenate it with the letters that follow subsequent spaces or periods.
I have unsuccessfully tried to find scripts for this or articles on enabling this functionality in Salesforce. Any guidance would be appreciated.
Interesting question! I don't think there's a straightforward answer but as it's standard search functionality, not 100% programming related - you might want to cross-post it to salesforce.stackexchange.com
Let's start with searchable fields list: https://help.salesforce.com/articleView?id=search_fields_business_accounts.htm&type=0
In Setup there's standard functionality for Synonyms, quite easy to use. It's not a silver bullet though, applies only to certain objects like Knowledge Base (if you use it). Still - it claims to work on Cases too so if there's "AAA" in Case description it should still be good enough?
You could also check out the trick with marking a text field as indexed and/or external ID and adding there all your variations / acronyms: https://success.salesforce.com/ideaView?id=08730000000H6m2 This is more work, to prepare / sanitize your data upfront but it's not a bad idea.
Similar idea would be to use Tags although that could explode in size very quickly. It's ridiculous to create a tag for every single company.
You can do some really smart things in data deduplication rules. Too much to write it all here, check out the trailhead: https://trailhead.salesforce.com/en/modules/sales_admin_duplicate_management/units/sales_admin_duplicate_management_unit_2 No idea if it impacts search though.
If you suffer from bad address data there are State & Country picklists, no more mess with CA / California / SoCal... https://resources.docs.salesforce.com/204/latest/en-us/sfdc/pdf/state_country_picklists_impl_guide.pdf Might not help with Name problem...
Data.com cleanup might help. Paid service I think, no idea if it affects search too. But if enabling it can bring these common abbreviations into your org - might be better than reinventing the wheel.

Is it possible to have a top level domain that is 2 character and not country code?

As mention in title, I would like to know if the top level domain can be exactly 2 character and it is not country code.
Technically? Of course. Are there any? Well, if you're picky there's at least one that used to be a country code but no longer is (.SU). Will you ever be able to register a top-level domain that is not a country code? Almost certainly not.

want to highlight a route in a map for the city navigation application

i am preparing a city-map navigation mobile application in which i want to highlight a route to the user when he enters the two place's name. now, my problem is that i can find the places, but i am stuck at the part where i want to highlight the route between those two places.
can you please suggest some idea, so that i can use that in my application. thnQ
What you need is a pathfinding algorithm to determine the path. If you want an efficient and pretty standard algorithm, there is an algorithm called A* for finding the best path between two places. It's a subject by itself.
Here is a nice tutorial to understand the algorithm:
Link
And you can also google "a star pathfinding", and you'll find a lot on the subject.

Cross Referencing Databases on Fuzzy Data

I am currently working on project where I have to match up a large quantity of user-generated names with a separate list of the same names in a canonical format. The problem is that the user-generated names contains numerous misspellings, abbreviations, as well as simply invalid data, making it hard to do a cross-reference with the canonical data. Any suggestions on methods to do this?
This does not have to be done in real-time and in this case accuracy is more important than speed.
Current ideas for this are:
Do a fuzzy search for the user entered name in the canonical database using an existing search implementation like Lucene or Sphinx, which I presume use something like the Levenshtein distance for this.
Cross-reference on the SOUNDEX hash (which is supposedly computed on the sound of the name rather than spelling) instead of using the actual name.
Some combination of the above
Anyone have any feedback on any of these or ideas of their own?
One of my concerns is that none of the above methods will handle abbreviations very well. Can anyone point me in a direction for some machine learning methods to actually search on expanded abbreviations (or tell me I'm crazy)? Thanks in advance.
First, I'd add to your list the techniques discussed at Peter Norvig's post on spelling correction.
Second, I'd ask what kind of "user-generated names" you're talking about. Having dealt with both, I believe that the heuristics you'd use for street names are somewhat different from the heuristics for person names. (As a simple example, does "Dr" expand to "Drive" or "Doctor"?)
Third, I'd look at a combination using testing to establish the set of coefficients for combining the results of the various techniques.

How do you name your projects?

At work we're having issues with different people wanting/suggesting different names for a new project. It's changed 4 times in the last 2 days.
What processes do people go through when naming internal projects? How do you work as a team to come to a conclusion for a project name?
To make this a little clearer, the question is HOW do you name your projects, not what do you name them. I'm more on about a process so we don't get the 3/4 managers involved spending the next 4 weeks changing the name of the project every 4 hours
Why is the team choosing the name. Don't you have a manager? That's how organizations are supposed to work: if one level can't achieve the goal in a timely manner, escalate it up to the next level.
What a colossal waste of time!
We name them after asimov characters.
The blackjack client was Hari.
Have everyone put their suggestions in a hat, and pull a name at random. Does it really matter?
Have the team make many suggestions.
Have management and Legal weed out the problematic names.
Have the team vote on the remaining names.
Make a list of all potential names, each person only gets to make one name suggestion. Have everyone vote on the names. Each person can vote only once, and not for their own name.
It really depends on how saddled with a name you will be.
For instance if its a .Net project, you will be quite stuck with the name you choose, in which case the projects usually get a really boring naming, even if the site has a nice naming.
In other technologies where there is no "manifest" to the code, named as a project, and moving the code to a new folder name is the "project" then witty names seems to be great fun.
One company I was with named all their projects according to vacation city names. So we had Paris, Athens, etc. I've also used greek gods and constellations. There wasn't much of a process to it, just whatever the development team thought was cool. Though there was an instance where we allowed our beta partner at the time to pick the name of the project - they had a whole contest and everything.
Another project I was on had four phases:
Red, Green, Blue, and 4
Gotta love that.
Use letters to indicate versions of your product, and have team members vote on words that start with the letters.
We've had one project that was named Ambition, Benevolence, Charisma, etc.
I like to use Instant Runoff Voting for this.
I've also found that having new team members suggest names helps them feel ownership for the project.
For my personal projects I name them after Revolutionary War battles (e.g. Lexington, Concord, Saratoga, Ticonderoga). I'm also fond of using names from Greek mythology since I'm a big fan of that :)
Another personal project was named Rushmore (as in Mt. Rushmore). IMO it all depends on what you fancy and whether or not the project name is going to be publicly visible. If it's not, then name it whatever you want (the more mysterious the better if you ask me!) but if it will be public then choose something that doesn't sound ridiculous or will make people go "Huh?". Project Fig Newton or Project Twinkie might sound funny to a group of devs, but how will it sound to customers?
Name your projects in a way that helps developers know what they are when you put the under source control. Outside of your current source control it doesn't matter what people call it.
Try to pick a naming convention that stays the same it will help organize things in your source control and try to stay away from initials and abbreviations because once all the DEVs on that project leave no one will know what the project is.
Try sticking to names like:
customerA Website
customerB WinApp
One place I worked used mountains for the framework, and ski resorts for the client; Another used tube stations. In both cases they were internal names that didn't have a fixed version number (as marketing had a habit of changing that)
I've seen architects choose, CTOs mandate, dev teams rota, and a reward for some arbitrary competition but ultimately it comes down to one man with one vote. You can democratise that any way you want, but whatever you do just make sure it's inoffensive and you stick to it.
Fwiw, my favourite system has been the architect who chose Judge Dredd characters. :D
For personal projects I sometimes use names of big cities, like New York, Berlin, Tokyo etc.
It' both convenient since I feel the project isn't bound to a specific technology or function and can involve into whatever it might be, while at the same time it can be a bit difficult remembering if it was Tokyo or Oslo which was doing "that" cool thing..
At work we have a tradition for more simple and descriptive names. For instance an application that uploads files according to a schedule is called ScheduledFileUploader. And then there's FileOrganizer, MailSender, DiskSpaceMonitor et.c..
you mean a code name? since its gonna stick only in the minds of internal employees, we usually named it the first thing we thought of and we never put it up for discussion, one project we had named "Dough" seriously! :) and it worked like magic, anything works
Female names (everybody likes a nice name, specially if it brings nice memories)
Animals (everybody likes animals)
We usually agree very fast on this one, no problems there. After we have named something, for example, "chipmunk", the jokes and funny pictures start to arrive (everybody likes making up jokes :)
But really, I don't think it makes a difference.
Name your projects after constellations. There are plenty to choose from, most sound cool. Also when you get to the Aries project, you can tell people that you're checking the cell structure and the cell structure has been checked.
With great care and a lot of personal pain. I quite frankly obsess about my personal project names. Even to the point that I will spend hours thinking about the name of a particular type or DLL.
Sadly this is not a joke.
No project names, just version numbers.
Everybody knows that if you released "MyBlaPro 4" you are working on "MyBlaPro 5" and it is going to be out in 1-2 years (your company history can offer a hint on the length of your dev. cycles).
The big secret is not that you are working on the next version, but when it is out.
Code names confuse not only outsiders (think Avalon/WPF, Longhorn/XP/2000/Vista/7) but also insiders. You can sometimes hear discussions like this "no, we added X in Zimfandel, before Cabernet" "no, you are wrong, Cabernet was 5, Zimfandel was 6, but X was added in Merlot"
Add to the mess the half-outsiders. Think localization companies that have to reuse memory translations between versions ("for Rainier we should use the memory from Shasta, or from Whitney?").
My big brother Mikael has been called to some firefighting in very late projects which...he chose some movie titles
Save Willy - a bloated java project
Harry Potter - a architectural disaster java project

Resources