Questions tagged [sentence]

A sentence is an ordinated sequence of words in a given language. often referred to as "document" in Natural Language Processing.

364 questions
-1
votes
1 answer

How to display "..." (3 dots) if a sentence takes more than 2 lines in php?

I looked all over online for this but could not find. I only found for those that use string longer than a specific number defined but I need to display those dots if the sentence takes more than 2 lines. For example, sentence below is long : The…
-1
votes
2 answers

Create table from text file using PHP

I need to create a table with borders from the text file (this text file is updated every time when someone finishes filling a form. One row, one person): Herard|TRO789|Suzuki|France|Gendolfina|Fresko|food|500|2015-04-25…
Albance
  • 169
  • 1
  • 2
  • 11
-1
votes
1 answer

PHP - Display different sentence on every page load

What I need is, I want to save an array of different sentences and let one of them randomly display on every pageload. Would that be possible? If yes, then how?
-1
votes
1 answer

How to search a passage of text using a dictionary as reference

I would like to create a database of words, where the word and part of speech is listed. Then, for simple examples, I would like to search a passage of text and identify the words' parts of speech based on the database.
-1
votes
1 answer

python average phrases per sentences

These two functions are given. def split_on_separators(original, separators): """ (str, str) -> list of str Return a list of non-empty, non-blank strings from the original string determined by splitting the string on any of the…
-1
votes
1 answer

How to recombine split sentences?

I am processing PDFs that have been converted to text. The problem? Sometimes a sentence gets split due to wonky PDF formatting and/or PDF-to-text conversion. So I'm looking for tools that help "reassemble" sentences that got split apart. Page…
David J.
  • 31,569
  • 22
  • 122
  • 174
-2
votes
1 answer

Why java faker generating sentence in Latin language. I need in English language

Here is my code. Faker faker = new Faker(new Locale("en-GB")); String title = faker.lorem().sentence(3); System.out.println("title = " + title); The output is as below. title = Ut at quis corrupti explicabo. I checked in google translate. It is in…
-2
votes
2 answers

What is wrong with my sentence palindrome code (C++)?

The below code is of a sentence palindrome checker. I'm a newbie programmer so I'm having a hard time debugging this code. It's showing incorrect output. For example, if the sentence is "A man, a plan, a canal: Panama" It's giving false as a result…
-2
votes
1 answer

Creating a dictionary of three word phrases based on input

def splitSentence(sentence): dictionarySentence = {} setence_split = sentence.split() three_word_list = [' '.join(setence_split[i:i+3]) for i in range(0, len(setence_split), 3)] #grouped_words = [' '.join(words[i: i + 3]) for i in…
QMan5
  • 713
  • 1
  • 4
  • 20
-2
votes
1 answer

Convert values of a data-frame into sentence in Python

I have the following dataframe in python: enter image description here I would like to convert from word ok(index = 0) to something(index =24) into one sentence based on end_sentence column value which is 1 to indicate end of a sentence. Similar…
-2
votes
2 answers

find a certain word in sentence in c++

I want to write a program that finds a word that the user entered I think my solution is right but when I Run it, the program shows nothing in the console anybody can fix it? int main() { char sen[200],del[200],maybedel[200]; cout<<"enter…
-2
votes
1 answer

how to split a string of text into 2 columns in python

I am struggling to split the string of a file text into 2 separated columns. After I split text into sentences for s in sentences: row = s.strip() print(row) it provides me this output in the same column: ['1' "It is hands-down…
Julie
  • 151
  • 1
  • 1
  • 8
-2
votes
1 answer

Word Breaking in Java

I want to beak a sentence which has no spaces between next words. Example : String str = "johncancomewithme"; I want to print the string as follows: "john can come with me" My main concern is about occurrence of proper noun
Ilham
  • 33
  • 1
  • 1
  • 6
-2
votes
2 answers

Need to reorder list and make a sentence in python

I need help rearranging this list alphabetically list= ['z', 'a', 'b', 'y', 'c', 'x', 'd', 'w', 'e', 'v', 'f', 'g', 'u', 'h', 'i', 'j', 't' ,'k', 'l', 's', 'm', 'n', 'r', 'o', 'p', 'q', ' '] into "hello world" by indexing into the array. How…
kino
  • 51
  • 3
-2
votes
4 answers

How to count words in a sentence of a text in multiple sentences in python

I've searched around for a solution to this problem but I haven't found it yet. I have a large text file which is divided into sentences, separated only by "." I need to count how many words each sentence has and write it into a file. I'm using a…
BLaZZeD
  • 11
  • 1
  • 3