Clustering 1-gram Strings
You said:


  All the algorithms I've checked so far e.g. n-grams variants, bag of
  words etc. are only used for clustering strings that are part of a
  context but here is not the case.


However, those algorithms can still be used if you don't treat tokens as full words, but as combinations of characters instead.

Here is an example of such algorithm in Python using Sklearn.



from sklearn.feature_extraction.text import TfidfVectorizer
from sklearn.cluster import KMeans

data = [
    'alex@examplemail.com',
    'bernard@examplemail.com',
    'chris@newmail.com',
    'dorothy@nemail.com',
    'emily@examplemail.com'
]

X = TfidfVectorizer(analyzer='char').fit_transform(data)

kmeans = KMeans(n_clusters=2).fit(X)

for cluster in set(kmeans.labels_):
    print('\nCluster: {}'.format(cluster))
    for i, label in enumerate(kmeans.labels_):
        if label == cluster:
            print(data[i])

&gt; Cluster: 0
&gt; alex@examplemail.com
&gt; bernard@examplemail.com
&gt; emily@examplemail.com
&gt; 
&gt; Cluster: 1
&gt; chris@newmail.com
&gt; dorothy@nemail.com


The major trick is TfidfVectorizer(analyzer='char'), where you don't treat n-grams of words, but of characters instead.

P.S. If you at some point want to use word n-grams (if you have generally well written sentences) you can use TfidfVectorizer(analyzer='word').