2

I want to calculate all the tag synonyms possible for any given tag.

TagSynonyms table gives the relation between Tag1 -> Tag1Master.

As per TagSynonyms table, Master tag can be mapped to multiple source tags.

I have the following questions in order to calculate all (Direct relationship to master + all the tags using transitivity) the synonyms for a given Tag1:

a) Can any SourceTage have multiple master tags? My guess is no.

b) Can master tag appear as a SourceTag?

c) Does TagSynonyms table contain tags from all the StackExchanges (ie. Android.StackExchange, Security.StackExchange, etc.)?

2

a. Can any SourceTage have multiple master tags? My guess is no.

the second resultset in this query would answer that and your guess is right, there are no such occurances

select sourcetagname
     , count(*)
from tagsynonyms
group by sourcetagname
having count(*) > 1

b. Can master tag appear as a SourceTag?

Yes, on Stack Overflow there is one such occurance, elastic-beanstalk:

select *
from tagsynonyms
where sourcetagname in (select targettagname from tagsynonyms)

c. Does TagSynonyms table contain tags from all the StackExchanges (ie. Android.StackExchange, Security.StackExchange, etc.)?

No, each site had its own database. There are today 174 sites. In SEDE you'll find 346 relevant databases: 172 main sites, 172 meta sites, StackApps.se and Meta.se

  • 1
    TagSynonyms is not available in the datadump. You can get them from SEDE and use the Download CSV option. – rene Apr 1 at 21:31

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .