I am trying to get a list of news stories from a database and list them, limiting them to a just 100 characters, and rounding them off to the nearest whole sentance, with a Read More » link to read in full. I have written the code, but its not working. Code:
THe script would see the 2 terms, locate them and then see the distance based on the words that lay between them. A more advanced version would be to examine the semantic structure - and identify whether the terms occur within the same semantic element, or a sibling, or a parent etc. Thus proximity discovery of terms may be within the same paragraph, or in sequential paragraphs, or under the same "parent" (heading) but otherwise separate etc. Further - introducing things like word stemming/relationships/soundings at a later date may be useful too.
I've looked around the net (Google, here, php forums, php script sites). Not seeing anything like it. I can see tools on some sites that do similar (limited) - usually SEO based tools. I want to be able to apply this to "text" in general ... as I may apply it to uploaded word/txt files etc. I'm not seeing any real examples - so I can only assume it's mroe than a trifle to code it. How would I handle variant order of the words (Word1+Word2 / Word2+Word1)? How could I handle identifying proximity within/outside of the same element/structure?
Bold Some Words In A String And Remove Some Unbold Words?
I am creating an Image Search Engine. Currently, my script does bold the matching words on the keyword. But, some keywords are too long just like the followings. When I search for shah rukh khan, there is an image with the following keyword.
25216d1235653089 shahrukh khan s wallpaper shah rukh actor
As you see, the above keyword is too long. So, I need it to be like the following one.
Currently, I am using the following code but it requires a space before and after the bold tags. So, if the 1st word is bold, it displays the whole keyword.
so far on page one it takes word from text box and produces search on datebase for that word then produces correctly over the folling pages using pagination. question is i want it to now perform search onto words and display the 2 words. code is below. :_
I am looking for a class that converts Singular words to Plural words. My aim is to take something like Story for a model name and create a Story.php file and a stories.php file. I already have the generator class ready to roll just hoping there is some prebuilt class for converting singular to plural word otherwise i'll start this the most expected ones and work from there.
Organize Words So Can Fit The Most Number Of Words In A Given Length?
I'm looking for a way to do the following. I have a list of words of various char lengths. I have a limited number of chars I can use in a given strings size. I'd like to organize the words to fit as many of them as I can in a given string without going over the limit or cutting any of the words off.
Bobby Sally Joe Sue
I have a limit of 140 characters to fit them all in, including spaces. If I have more names than space avail in that string, I'd like to generate another string using the same function as described above until all the names in the list are used.
what i want to do is for the first page get the first 20 say and then for the second get from 21 to 40 and so on. Is this possible in the query? I can obviously code it up to do the logic in PHP but thats going to be inefficent and people might laugh at me behind my back.
i'm working on an event listing site. when someone lists an event, they can upload 3 images. Rather than uploading every single image to a single directory, i'd like to break the uploaded images out into a bunch of different directories. otherwise, any attempts to view the contents of the user image folder could result in a really LONG wait as we list a billion images. I'd like to limit the contents of any given directory to a thousand items.
I'd also like to support a very large number of events and images (1 billion? 10 billion?). I realize that many images might overload a single drive on any server, but am still determined to do it. Seems to me that some sort of recursive function might be necessary? It's easy enough to turn an event id into a folder. it's also not so hard to make a new subdirectory so there are no more than 1,000 events in a irectory. what's more difficult is when we exceed 1 million images. then my top level directory would have more than a thousand images in it.
I have a table in my database that contains fields relating to addresses. What I want to do is to give the user a choice to view all the locations from a certain county. As there can be multiple instances of a county in the table how do I ensure the county only gets displayed once. For example in the table I may have 5 entries which are:
Devon Cornwall Devon Devon Sommerset
When I retrieve all the information from the table I want to display only