Finding A Matching String From A Partial Search (fuzzy Logic?)

Jul 6, 2011

I have a list of names of players and their names in some game. Now an administrator of that game might want to contact one of the players by sending him a message. He does that by writing a command that basically has the format "tell <player> <message>", where <player> is the name of the player.The problem is simple: player names might be quite complicated and long (it's their screen name not their real name), and it would take the admin quite some time to find out how to spell the name exactly and he will probably make a few mistakes. Basically, having the admin type out the exact name is not practical.So I am trying to implement a 'fuzzy logic' search (is that even the correct term?) but with a twist, I guess.The idea is that the admin can type just part of the name and is even allowed to make a couple mistakes. For example, suppose a player has a screen name of "Mr.Smith34", then the admin should be able to type, for example.[code]

The problem now is that there can be absolutely no ambiguity in which player is meant. Instead of sending a message (which is quite harmless) the admin should also be able to 'kick' or ban someone from a game server, banning them from ever playing there again. Obviously, the admin should then not accidently ban a player named "Mrs.Smith" when he meant "Mr.Smith"! My solution (unless someone else can come up with something better) is to just not allow the command if there are multiple matches. If the admin searches for 'smith' and there are multiple names that are similar to 'smith' (maybe even 'sith' or similar) then I disregard that search and tell the admin he needs to try again with a more specific name.(If all else fails he can always look up the ID of the player and use that, which should be foolproof as long as the admin doesn't make a mistake and picks the wrong ID..., but that is even more work it does not have preference).But this brings further problems. The example I just gave might be good: suppose there's a player "Mr.Smith" and a player "Sith". If the admin searches for 'Smith' then there should be no question who he meant (Mr.Smith), but I am sure any fuzzy logic implementation would count Sith as a very close match... Another thing is that my solution of only allowing the search if there is just a single match probably wouldn't work. I have never used fuzzy logic searching before, but I can imagine some names being marked as 'slightly similar' even when they are completely different ('smi' might match 'smith', but also 'ims' perhaps, in which case it would possibly match a whole new range of names), even though 'for humans' it is clear which result is meant.

I am assuming any fuzzy search would return the matches and rate them according to how similar they are to the search term. Perhaps I can choose some kind of cut-off value, where any matches that are less than 30% similar (I've no idea just guessing here) are assumed not equal whereas higher ranked matches are assumed a possible match. Perhaps this makes it easier (perhaps harder, I dunno), but I forgot to mention that the search term cannot contain any spaces. Player screen names can contain spaces though. I am thinking to just strip out the spaces of each name before starting the search, but perhaps there are better solutions in combination with fuzzy searching...

View 13 Replies


ADVERTISEMENT

Forms :: Search Partial String Using Textbox From Listview In 2005?

Aug 23, 2011

how to search partial string using textbox from listview in vb.net 2005?example i have my record in listview:

Apple
Grapes
Mango

now if im going to type string in textbox like "pl" only, then the selected items will be the apple.

View 3 Replies

VS 2008 - Fuzzy Search With Suggestion If No Match Found

Jun 26, 2009

I'm creating a search application that needs to have a fuzzy search. Basically if there are 0 results, I need to provide a suggestion, much like google. For example, if I type "Californea", I need my program to suggest "California" after doing a query on my DB for similarity.

View 12 Replies

Finding A Matching And Replacing The Value?

Oct 21, 2009

i have 2 groups of text in my text file

Bottom
11.0 28 Red (2 13.10 04.0) [1 16.71 33.3] 130611 2948 229111 28275
6.5 28 Blue (2 03.00 03.0) [1 05.36 58.3] 132111 -67725 191611 -51225
2.0 28 Blue (1 05.36 45.3) [1 05.36 58.3] 211111 51225 210454 34691

[Code].....

View 14 Replies

Cannot Search A Database For More Than One Matching Record?

Dec 12, 2010

I have a textbox for searching a database. When the text changes it runs a functioncFilter() and loads the records. It is set up to search different columns of a database, and it unfortunately only the first record matching is pulled from the database. Example: when the database contains two people (Bob Smith & Bob Smitt) the user can type the name in the search field. However When the user types Bob Smit it only returns Bob Smith and not both names in the database. I want this to act as a filter, dynamically changing the last with each additional letter typed in the search box. Below is my source code,

Public Sub cFilter()
Dim myConnectionstring As String = ("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & My.Settings.dbLocation & ";Persist Security Info=True;Jet OLEDB:Database Password=BCFAdmin")

[code].....

View 4 Replies

Project - To Search File With Any Thing Matching

Mar 3, 2010

I have a search Option in my Project i want to search File with any thing Matching

Supposly : I have a File With the name "nokia samsung" And user type "Samsung" in Search TextBox and if User type "nokiasamsung" then my application also able to Understand. What my Code i cant make a Figure

View 9 Replies

How To Search And Atleast Select Matching Entries In List-box

Jun 30, 2010

I am to make a program that lets the user save certain data values with a delimiter(":") to a text file(done) Example of data entries [code]Then i am to load those values to a listbox , i was able to do that as well and i include the delimiter when i load the values.Now i am supposed to let the user enter any month/year value for date(mm/yyyy) such as 06/2010 and if any of the entries match the search string then either the program selects those values in the listbox or a popup msgbox is used to show the entries. How the result is displayed is a little irrelevant, but how do i search and atleast select the matching entries in the listbox ? and not just the first instance but all instances of the search string.

View 3 Replies

Full And Partial Not Part Of String

Aug 12, 2009

Using vb.net 2003 asp.net 1.1. I have this C# function that I converted and I gettinga squiggley saying full and partial not part of string, this is converted from a .cs file.

Here is the function, maybe I'm not seeing something:
Code:
Public Function RefundTransactionCode(ByVal refundType As String,
ByVal transactionId As String,
ByVal amount As String,
ByVal note As String) As String
Dim caller As CallerServices = New CallerServices
[Code] .....

View 4 Replies

How To Remove A Listboxitem Based On Partial String Match

Apr 20, 2011

Heya so im close to be done with this project but unfortunately i still have a couple of questions ill start with the first, imagine this listbox contents:

[Code]...

Now imagine theres a string with : "2-12-2009 | 11:30"How can i delete a listbox item if the string matches the listbox item text after the arrow?It might sound a bit confusing but what im planning to do is to delete a listbox item based on the date of the event and not the date of the alarm.

View 6 Replies

Asp.net Mvc - Convert C# To .Net - Using MVCContrib Blockrenderer To Render A Partial View To A String

Jun 11, 2009

I need to render a partialview to a string, and I am trying to convert a C# example to VB.Net, as I am stuck with that for this project.This is causing me a headache from these two problems:

ObjectViewData - I can't figure out what that is
RenderPartial is a sub, but seems to be used as a function - I don' get it

I reference the MVCContrib.UI, so I don't need to convert that. But these two functions, I do need to convert:

[Code]...

View 4 Replies

VS 2010 String Matching?

Jul 22, 2011

In javascript I know you can put for instance if date= "2010"* which would do the if for the string if it starts with 2010 but it doesn't matter what comes after that.

View 4 Replies

VS 2008 - Check For Most Matching String

Jun 9, 2010

I want to check each of the strings in an array (currently in a hashtable, but that shouldn't necessarily matter right?) with the user's input, if the words in each of them match. This might have sounded a little tricky so let me elaborate.

Problem: Comparing an input string with a collection of strings, and know which string in the collection matches the input string the most - based on words. What I'm trying to do here is a chatbot that works with keywords. For example, in the bot script, you could find "HOW ARE YOU" and the response "I am fine." If the user then sends input to this bot, it could look like this: [Code] This may not sound like a tricky thing, but the tricky part comes when I want to know which of the strings (e.g. "HOW ARE YOU") match the input string the most, based on the words.

View 1 Replies

Search Through Xml Searching Each TagNum Then Return All Info Associated With Matching TagNum

Jan 19, 2009

I am parsing or attempting parse an xml file that looks like this [code] myNode.FirstChild is where I think I might be going wrong here but anyway.What I want to do again is search through xml searching each tagNum then return all info associated with the matching tagNum.

View 1 Replies

Partial Entity Class With Shared Extension Not Associated With 'other' Partial Class In Client Using RIA Services?

Apr 21, 2011

I have extended an Entity Framework 4 entity class with a calculated property in a partial class. This member is not available on the client to which the entities are exposed via WCF RIA Services.when using C# appears to be changing the extension of the partial class file from .cs to .shared.cs. I tried this with my VB.Net solution (.vb to .shared.vb) and got a long list of errors. I believe what happened is that the partial class lost its association with the entity on the client - it inherited from object rather than EntityObject.

My best guess is that this is related to the way that VB.Net handles namespaces.Each project has a 'Root Namespace' which is prepended to anything that is defined within a code file. C# has a 'Default Namespace'which is the namespace into which new types are placed by default - via a namespace statement within the file.The partial class is probably having the client namespace prepended to it which puts it into a different namespace than the entity with which it is associated on the server.Is there any means of extending an entity in such a way that those extensions are available on the client via WCF RIA Services and VB.Net?

View 1 Replies

Matching Text String On First Letter In SQL Query

Feb 28, 2012

[Code]...

In this exmample textData is a string of text and alpha is a single letter a through z or A through Z. I don't need the criteria to be case sensitive, but I do need only the first letter of textData to match alpha. I have tested the LIKE comparator and it does not return all records that begin with alpha.

View 3 Replies

Avoid Fuzzy Printing After A Screen Capture?

Jun 21, 2011

I'm using the code below to capture and print a windows form. The problem is that it prints out very fuzzy. Is there any way to have it print more clearly?

Imports System.Drawing.Printing
Public bmp1 As Bitmap
Private WithEvents printDocument1 As New PrintDocument

[Code]....

View 1 Replies

Pattern Finding In Files Using Byte Arrays And Multiparted Patterns To Search ?

Nov 28, 2011

As a continuation of my other thread, "Finding A Pattern without a string Array (http:[url]....)", I would like to continue asking questions about enhancing a scanner with a few things:

1. Here is my code for finding signatures in a file:

'First the Signature Class:
Interface Signature
End Interface[code]......

View 2 Replies

Return Rows That Have A Matching String To Predefined List?

Jul 8, 2009

1 within each section of a SplitContainer. The left hand side will be for inputing text that is copied/pasted from a word, excell, or text file.The right hand side would be for my output. What I would like it to do is return just the rows from the left hand side that contain a match to any one of the predifined strings. This will be used to search large lists of company names and circuit IDs and return the rows with matching namesSo far I have the form created, the Splitcontainer in place along with the richtextbox on each side and a submit button at the bottom.

View 12 Replies

Searching Text Box Input For Matching String Values?

Jul 8, 2009

I have to scan through documents. Excell, Word, txt, ect looking for company names that match a pre-difined list of companies.I then email the companies some specifics in regards to that doc.The problem I have been having recently is that the list of companies keeps growing and I am starting to miss some more than I used to.What I would like to build is a tiny app that has 2 Text boxes.1 on the left for input (where I would copy/paste) the document text I receive.and one on the right for the output where it will highlight any line that contains the name of any of the pre-defined companies.

I started toying with the idea and so far I have form with a SplitContainer. Within that SplitContainer each side has a TextBox... Below the Textbox on the left hand side splitcontainer I have a submit button with no actions currently assigned to it.

View 6 Replies

Finding/replacing Multiple Sets Of String Within A Parent String?

Mar 28, 2012

I've got an issue with a program I am writing. The specific issue is replacing characters in a parent string by finding, and matching, specific characters within it that are parsed from an external xml file. It's for a chat-like client.Here's the 2 classes I am using to pull the emote strings, titles, and id from external XML:

Imports System.Text.RegularExpressions
Imports System.Xml.Serialization
Public Class emote

[code].....

View 1 Replies

Autocode Generate - First Query Finding Max Of A And Second String Take String A

Mar 15, 2010

Private Sub txtname_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtname.TextChanged

myConnection.Open()

[CODE]...

I want to four digit code like Abneesh than first query finding max of A and second string take string A than code generate like A001----------A999

View 1 Replies

[2008] Finding The First Empty String In A String Array?

Mar 2, 2009

i have a string array that i want to output to a text file. the array size is 10000. i fill the array starting from 0 with some strings. at the end, i only want to show the array from index 256 to the last array that is not empty (for eg. if the array is filled with data from 0 to 2000, i only want the text file to show the data from 256 to 2000 and ignore the remaining strings). Is there any function to do this?t i use is shown below

Dim myArray(10000) as string
Dim strArray As New System.IO.StreamWriter("c:List.txt")
strArray.WriteLine("{0,10}{1,30}", "Index", "Symbol")

[code].....

View 8 Replies

Interface And Graphics :: Fuzzy Gradient Lines And Line Smearing

Apr 8, 2012

I look at hundreds of VB.Net user interfaces through the internet and they all look horribly unsophisticated from a graphics point-of-view.Compare this to the backgrounds seen on tv broadcast that use blurred line gradients to create graphics that have some interesting appeal and draw the eye to them (at least my eye).I've attached some sample screenshot grabs below that I have annotated with magenta rects showing the interesting sections.What types of graphics routines can produce these types of graphic effects? The options that I have identified so far:

1.) More carefully done line smearing (see below..)

2.) Line drawing with a VB.Net version of the "Bresenham's line drawing algorithm"(as passel mentions in this post) (that might allow a specialized set anti-aliasing routines - like a wu algorithm).

3.) Line drawing with some Gaussian blurring as seen in the attachment to this post from my Perlin Noise thread.

4.) Possibly a gradient shaped by a vector GraphicsPath?

5.) Some other VB.Net gradient generating method?Possible the use of multiple passes with an alphafade brush?

6.) Last resort: manipulating the colors of individual pixels with lockbits marshal copying (highly undesirable).

I've done a fairly complete survey of whats out there on the internet for VB.Net samples for drawing lines to see if any of them combined line drawing with gradient effects and found very little.I played around with some code I found that did line drawing through mouse dragging and managed to achieve what I call the "line smearing" effect.I've attached my Line_Smearing_Demo below..As yet I have been unable to combine lines with shaped bezier curves,to produce Guilloche/Lissajous/complex Spirograph patterns like those seen on this page.

View 19 Replies

Gradually Transition To NHibernate Persistence Logic From Existing ADO.NET Persistence Logic?

Sep 3, 2010

The application uses ADO.NET to invoke sprocs for nearly every database operation. Some of these sprocs also contain a fair amount of domain logic. The data access logic for each domain entity resides in the domain class itself. ie, there is no decoupling between domain logic and data access logic. I'm looking to accomplish the following:

[Code]...

View 2 Replies

Programming Syntax - Searching An Array For A String Matching Input - Visual Basic

Jan 20, 2012

I can't figure out the syntax for searching an array of stored words for a string matching an input string. I understand the pseudocode of it, but I'm tripping up over what variables I need to put where, and how they should be formatted. More than happy to provide more details should anyone request them.

[Code]...

View 1 Replies

Regex - Matching And Replacing The Contents Of Multiple Overlapping Sets Of Brackets In A String?

Jun 5, 2011

I am using vb.net to parse my own basic scripting language, sample below. I am a bit stuck trying to deal with the 2 separate types of nested brackets.

Assuming name = Sam
Assuming timeFormat = hh:mm:ss
Assuming time() is a function that takes a format string but
has a default value and returns a string.

[code]....

I could in theory change the syntax of the script completely but I would rather not. It is designed like this to enable strings without quotes because it will be included in an XML file and quotes in that context were getting messy and very prone to errors and readability issues. If this fails I could redesign using something other than quotes to mark out strings but I would rather use this method.

Preferably, unless there is some other way I am not aware of, I would like to do this using regex. I am aware that the standard regex is not really capable of this but I believe this is possible using MatchEvaluators in vb.net and some form of recursion based replacing. However I have not been able to get my head around it for the last day or so, possibly because it is hugely difficult, possibly because I am ill, or possibly because I am plain thick. I do have the following regex for parts of it.

Detecting the parentheses: (w*?)((.*?))(?=[^(+)]*((|$))
Detecting the square brackets: [[(.*?)]](?=[^[+]]*([[|$))

View 2 Replies

Finding The First Empty String In String Array?

Mar 2, 2009

i have a string array that i want to output to a text file. the array size is 10000. i fill the array starting from 0 with some strings. at the end, i only want to show the array from index 256 to the last array that is not empty (for eg. if the array is filled with data from 0 to 2000, i only want the text file to show the data from 256 to 2000 and ignore the remaining strings). Is there any function to do this? i am using visual basic express 2008. The code that i use is shown below

[Code]...

View 2 Replies

FInding Where A String Has Changed In A String Loop

Jan 5, 2011

I have a somewhat unique problem that I have looked for an answer to and continually hit brick walls. The problem is this. I'm using vb.net to read a byte array from memory which total 32768 in length, which is converted to a string. The memory is the active console chunk in the game Call of Duty 4.

[Code]...

View 2 Replies

Argument Matching Parameter 'separator' Narrows From 'String' To &#391;-dimensional Array Of Char'. ERROR?

Dec 28, 2011

Argument matching parameter 'separator' narrows from 'String' to &#391;-dimensional array of Char'. ERROR

View 7 Replies

Finding A Position Of A String Within A String?

Oct 28, 2009

is instr used in vb.net for this?

View 3 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved