Click here to Skip to main content
Click here to Skip to main content
Add your own
alternative version

UDDI Explorer: Tool for searching web services

, 20 Dec 2005
Tool for searching web service(s) and viewing their WSDL information.
UDDI Explorer.exe
Weather data from the National Digital Forecast Database NOAA's NWS.wsdl
UDDI Explorer
UDDI Explorer.csproj.user
UDDI Explorer.resharperoptions
using System;
using System.Collections.Generic;
using System.Text;
using System.Collections;

namespace ServiceRanking
    public class SyntacticSimilarity

		private static int[] _nameSimMeasures=new int[]{1, 2};

		public SyntacticSimilarity()
			// TODO: Add constructor logic here
		private ArrayList DetermineConstituents(string str)
			ArrayList constituents=new ArrayList() ;
            Tokeniser tokenize = new Tokeniser();
            string[] toks=tokenize.Partition(str);
            foreach (string tok in toks)

			return constituents;
		private  float ComputeConstituentSimilarity(int measure, object text1, object text2)
			if (text1 == null || text1 == null)
				return 0.0F;
			float sim=0.0F;
			if (((string) text1).ToUpper().Equals(((string) text2).ToUpper()))
				switch (measure)
					case 1: 
						sim=TextMatching.GetEditDistanceSimilarity((String) text1, (String) text2);
					case 2: 
						sim=TextMatching.GetTrigramSimilarity((String) text1, (String) text2);

			return sim;
		public virtual float ComputeCombinedSimilarity(string elem1, string elem2)
				if ((object) elem1 == null || (Object) elem2 == null
					|| elem1 == string.Empty || elem2 == string.Empty 
					) return 0.0F;

				string name1=elem1.ToLower();
				string name2=elem2.ToLower();

				if (name1.Equals(name2))
					return 1.0F;

				ArrayList tokens1=DetermineConstituents(elem1);		
				ArrayList tokens2=DetermineConstituents(elem2);

				float synsim=ComputeConstituentSimilarity(3, elem1, elem2);

				if (synsim >= 0.7F) return synsim;

                //float bigramsim=TextMatching.GetBigramSimilarity(name1, name2) ;				
				if (tokens1 == null || tokens2 == null) return 0.0F;
				int m=tokens1.Count;
				int n=tokens2.Count;
				float[][][] simCube=new float[_nameSimMeasures.Length][][];
				for (int i=0; i < _nameSimMeasures.Length; i++)
					simCube[i]=new float[m][];
					for (int i2=0; i2 < m; i2++)
						simCube[i][i2]=new float[n];

				for (int j=0; j < m; j++)
					String token1=((String) tokens1[j]).ToLower();
					for (int k=0; k < n; k++)
						String token2=((String) tokens2[k]).ToLower();
						for (int i=0; i < _nameSimMeasures.Length; i++)
							simCube[i][j][k]=ComputeConstituentSimilarity(_nameSimMeasures[i], token1, token2);

				float[][] simMatrx=SimilarityCombiner.Aggregate(simCube, 1);
				float comsim=SimilarityCombiner.ComputeSetSimilarity(simMatrx, 1);
				return Math.Max(comsim, synsim);
			catch(Exception )
				return 0;


By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.


This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


About the Author

Thanh Dao
Software Developer
Vietnam Vietnam
I'm still alive...but temporarily moved to work on mobile & web stuffs(j2me/brew/php/flash...something not M$). things have just been very busy, and probably will don't have chance to maintain & respond. Hope will have time to try to write again, because many ideas with WPF &silver light are waiting. wish me luck Smile | :)
- MESHSimPack project(c# library for measuring similarity among concepts of the MESH ontology):

| Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.150224.1 | Last Updated 21 Dec 2005
Article Copyright 2005 by Thanh Dao
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid