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
-2
votes
1 answer

Markov Models and Sentence Generator project (Python)!

I am in an intro to programming class and one of our final projects is to create a sentence generator. The requirements are that we have to take a sample input, strip it down to only lower case letters, use the Markov Model to determine the…
-2
votes
1 answer

Break text into sentences using bash

A sentence is a one that ends with period (.), exclamation(!) or question (?). I tried tr '\n' ' ' < input | sed -e 's/[.] \s*/. \\n/g' I see \n added in my file but the line does not really break there. I am using bash 3.2 version on Mac OS X…
Shanthi
  • 39
  • 4
-2
votes
2 answers

array join and create a url

I have a array of numbers like [ "1", "2", "3" ] and i need to create a url like https://api.edmunds.com/v1/api/configurator/withOptions?zip=90045&styleid=200701689&deselected=1&deselected=2&deselected=3&fmt=json&api_key=xxxxxxxxxx and my array…
Anbazhagan p
  • 943
  • 1
  • 14
  • 27
-3
votes
2 answers

How can I extract sentences with certain text in a spreadsheet?

I got a spreadsheet which looks like this. I will like to keep the file column, but extract only the sentences with the word "India". Is there a way to do that? Prefer to use KNIME or R, but happy with any solution. Only the sentences with "India"…
-3
votes
2 answers

How do I assign numbers to sentences?

I am trying to do this proverbs = "a bad excuse is better than none","A bad workman blames his tools," etc. number_of_proverb = random.randint (1,38) proverb = sentence number number_of_proverb But I have no idea how to assign numbers to…
-3
votes
2 answers

Read a file one sentence at a time?

Any idea how to read a text file one sentence at a time instead of one line at a time. The general idea would be to may be read-ahead and when the end-of-sentence is detected return the sentence. Now here comes the tricky part EOS is normally a…
sten
  • 7,028
  • 9
  • 41
  • 63
-3
votes
2 answers

How to get multiple inputs using scanner in Java?

This is the input of the program. 3 1 45 5 3 5 Fizz Buzz FizzBuzz Nil 4 13 10 2 7 Ba Bi Be Bu 49 23 5 5 10 Oong Greeng Kattu Eswah I want to get all these lines as input using Scanner and separate them into Integers and Strings. It is not…
Salitha10
  • 9
  • 4
-3
votes
1 answer

algorithm to find the "best topic" of searching list - python

I am trying to make a program which customize ads based on your search history. therefore, I need an algorithm / script that find the best keyword of Ad that will be adjusted to the specific person, based on the frequency of the word in the…
omersk1
  • 11
  • 3
-3
votes
1 answer

Associating the second word of a sentence to a variable. (Python)

I'm currently trying to perform this, but my book for class doesn't show anything in relation to Boolean variables or anything related to this problem. I've been looking online for a while and everything is way too complicated for something that…
-3
votes
1 answer

How can I identify sentences within a text?

I have text that looks like this:- "I am an engineer. I am skilled in ASP.NET. I also know Node.js.But I don't have much experience. " Here, "ASP.NET" and "Node.js" are to be treated as words. Also, there is no space before "But I...", but it…
Train Heartnet
  • 785
  • 1
  • 12
  • 24
-3
votes
1 answer

How to change a string input by the user into a dictionary with a key and value

sentence = input ("give sentence") user input = HELLO I LOVE PYTHON I want the sentence given to be changed into the format, with a variable sentence_dict {1:HELLO, 2:I, 3:LOVE, 4:PYTHON}
Mr.Code
  • 9
  • 1
  • 2
  • 11
-3
votes
1 answer

adding a number to numbers in a sentence or a topic

I have a sentence (i may use a topic) like this: George (98) Michael (65) Jim (53)... and so on. I want a code in any programming language which add one (+1) to the numbers so the result comes as: George (99) Michael (66) Jim (54) I perhaps use…
gihad
  • 1
-4
votes
1 answer

Java sentence shortening program doesn't work right

import java.util.Scanner; public class SentenceShortener { public static void main(String[] args) { Scanner kbd = new Scanner(System.in); String sentence = ""; String sentence2 = ""; String sentence3 =…
MVVV
  • 28
  • 5
-4
votes
1 answer

Display array of words in reverse order

I have some of my code already done I just do not know how I would display the sentence in reverse order than what is entered. For example; if one enters "my name is joe" It should display in the output: Joe is …
john
  • 31
  • 5
-5
votes
3 answers

How do I reverse a sentence in python?

I've been searching for a way to reverse sentences, but I can't seem to find one. I was hoping to find a way in Python; however, I'm not sure if there is a way to do it. If anybody knows of a way to do it, I would really appreciate the help.
1 2 3
24
25