473,394 Members | 1,715 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Use Linq to search List<class> and find a range of words

maylortaylor
72 64KB
So this is a very new territory for me and from what I can't find online, it's a new territory for most.

I am using tessnet2 OCR to read a pdf so I can extract some words/information.

When tessnet2 reads the file it compiles the results into a class..

Expand|Select|Wrap|Line Numbers
  1. public class Word
  2.     {
  3.         public int Blanks;
  4.         public int Bottom;
  5.         public List<Character> CharList;
  6.         public double Confidence;
  7.         public int FontIndex;
  8.         public int Formating;
  9.         public int Left;
  10.         public int LineIndex;
  11.         public int PointSize;
  12.         public int Right;
  13.         public object Tag;
  14.         public string Text;
  15.         public int Top;
  16.  
  17.         public Word();
  18.  
  19.         public override string ToString();
  20.     }
Now, most of that is useless for what i'm trying to accomplish. The one i'm focusing on is
Expand|Select|Wrap|Line Numbers
  1. string Text
- That is where each distinct word the OCR finds is stored.

Ok, so what I need help with is trying to use Linq to search through the Class result and find everything between
Expand|Select|Wrap|Line Numbers
  1. string word1 = "Number;"; 
  2.  
and
Expand|Select|Wrap|Line Numbers
  1. string word 2 = "Vendor:";
  2.  
This code is as far as I've gotten really.

Expand|Select|Wrap|Line Numbers
  1. List<tessnet2.Word> specificWord1 = result.FindAll(x => x.Text == "Number;");
  2. List<tessnet2.Word> specificWord2 = result.FindAll(x => x.Text == "Vendor:");
That that doesn't give me the range..just the two individual words.
Jun 28 '13 #1
0 1255

Sign in to post your reply or Sign up for a free account.

Similar topics

10
by: Case Nelson | last post by:
Hi there I've just been playing around with some python code and I've got a fun little optimization problem I could use some help with. Basically, the program needs to take in a random list of no...
8
by: Rob Meade | last post by:
Lo all, Ok - I'm adding site search functionality to a database driven website. I have a list of 390 stop/ignore words, having looked at ASPFAQ already I see that the example uses an array,...
0
by: SoftComplete Development | last post by:
AlphaTIX is a powerful, fast, scalable and easy to use Full Text Indexing and Retrieval library that will completely satisfy your application's indexing and retrieval needs. AlphaTIX indexing...
1
by: simon | last post by:
hi, I have the directory with files with doc or txt or similar extensions. Now I would like to create a text search (something similar like find text ALT+F7 in windows commander): user inputs...
1
by: Just Me | last post by:
Windows has a search command to find files containing a given string. Makes me wonder if there is some Windows API or managed method to programmatically search a directory tree for files...
2
by: vijayasankarb | last post by:
Hi All, I am developing one application in VBScript which automatically generates excel charts. But, I have a problem here. I need to get the range value(like A1:B50) before calling the...
1
by: micawber | last post by:
I would like to search and find records from Excel using ASP. Here is what I have so far, Can anyone help me? Thanks. <% Option Explicit Dim strConnection, conn, rs, strSQL, freephone
2
by: Joey | last post by:
I am querying a DataSet with LINQ. I am running into a problem when trying to construct my query because in the "from" clause I do not know the table name (range variable) until runtime. Possible...
9
by: =?Utf-8?B?cmF1bGF2aQ==?= | last post by:
Hi all: after reading different places/sites about linq... I ran into these questions: 1. What framework do we need to run linq ? (does it depend on what version of visual studio we have?) how...
2
by: gsreenathreddy | last post by:
hi! I have a requirement For example in this case it got fetched 2111 records from DB then it should display 2111 in words select count(*) from dummy
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.