Ask a Question

(Create a thread)
Go Back   Spanish language learning forums > Spanish & English Languages > Grammar
Register Help/FAQ Community Calendar Today's Posts Search PenpalsTranslator


Split by, split on

 

This is the place for questions about conjugations, verb tenses, adverbs, adjectives, word order, syntax and other grammar questions for English or Spanish.


Reply
 
Thread Tools Display Modes
  #1  
Old March 15, 2024, 03:07 PM
Tyrn Tyrn is offline
Pearl
 
Join Date: Jul 2019
Posts: 372
Native Language: Russian
Tyrn is on a distinguished road
Split by, split on

Hi,

This is a distinction I'm not at all sure of. The following is my guess, not a certainty.

Here's a string of words:

"alfa bravo charlie delta"

This is the string split:

("alfa" "bravo" "charlie" "delta")

Is it correct to say that the string is split by words, on spaces?

Last edited by Tyrn; March 16, 2024 at 12:56 AM.
Reply With Quote
   
Get rid of these ads by registering for a free Tomísimo account.
  #2  
Old March 15, 2024, 06:54 PM
wrholt's Avatar
wrholt wrholt is offline
Sapphire
 
Join Date: Apr 2011
Location: Boston, Massachusetts, USA
Posts: 1,408
Native Language: US English
wrholt is on a distinguished road
I would say that I split the string on spaces (or at spaces)* in order to split it into words, but only when talking about strings that are similar to your example string, which contains only arbitrary groups of alphabetic characters separated by one and only one space character.

If I don't know whether a string is guaranteed to satisfy that restriction, I would say that I split the string on spaces in order to split it into substrings.

For example, if I split the previous sentence on spaces, some of the substrings are "substrings." and "restriction,", which are not words in a strict sense, as the punctuation marks "." and "," are not part of the spelling of words in English.

Disclaimer: by education I'm a computer scientist, and I've worked as a computer programmer for more than 36 years.

*for reference, the documentation from Microsoft about the Split function in the .Net framework uses "at spaces" rather than "on spaces": https://learn.microsoft.com/en-us/do...MSDN#overloads

Last edited by wrholt; March 15, 2024 at 07:08 PM.
Reply With Quote
  #3  
Old March 16, 2024, 12:53 AM
Tyrn Tyrn is offline
Pearl
 
Join Date: Jul 2019
Posts: 372
Native Language: Russian
Tyrn is on a distinguished road
Yes, I meant computer science all along

So, we split strings on/at spaces, and into substrings. Still unclear: is it possible to split a string by words? I'm really interested in a short preposition.
Reply With Quote
  #4  
Old March 16, 2024, 10:28 PM
wrholt's Avatar
wrholt wrholt is offline
Sapphire
 
Join Date: Apr 2011
Location: Boston, Massachusetts, USA
Posts: 1,408
Native Language: US English
wrholt is on a distinguished road
Quote:
Originally Posted by Tyrn View Post
Yes, I meant computer science all along

So, we split strings on/at spaces, and into substrings. Still unclear: is it possible to split a string by words? I'm really interested in a short preposition.
"Split a string by words" doesn't sound as natural to me as "split a string into words".

"Split a string into words" describes the end result of splitting a string. "Split a string by words" suggests the method of splitting a string into smaller units, rather than identifying what the smaller units are. In this context, "by words" doesn't fit the context well, while "into words" does.

There are other types of data for which I could use "by" to describe how to group the data into smaller sets: for example, an economic analysis could report economic data grouped by some unit of time such as year, month, quarter, or week. Or it could report the data by cateory: medical spending, basic necessities such as food, clothing, or housing, and so on.

Note that I'm a native speaker of US English from the northeastern US. I cannot speak for other national, regional, or social varieties of English: there are differences of pronoun usage between different varieties of English.

Last edited by wrholt; March 16, 2024 at 10:36 PM.
Reply With Quote
  #5  
Old March 17, 2024, 01:04 AM
Tyrn Tyrn is offline
Pearl
 
Join Date: Jul 2019
Posts: 372
Native Language: Russian
Tyrn is on a distinguished road
Possible albeit debatable. One can settle for it, then. Word by Word: The Secret Life of Dictionaries by Kory Stamper is a book I can recommend for everyone .
Reply With Quote
  #6  
Old March 19, 2024, 04:07 PM
wrholt's Avatar
wrholt wrholt is offline
Sapphire
 
Join Date: Apr 2011
Location: Boston, Massachusetts, USA
Posts: 1,408
Native Language: US English
wrholt is on a distinguished road
Quote:
Originally Posted by wrholt View Post
...

Note that I'm a native speaker of US English from the northeastern US. I cannot speak for other national, regional, or social varieties of English: there are differences of pronoun usage between different varieties of English.
My proofreading wasn't that great when I stopped working on a previous reply: I meant to say "differences of preposition usage". That's what I get for writing responses after staying up longer than I probably should.
Reply With Quote
Reply

 

Link to this thread
URL: 
HTML Link: 
BB Code: 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Site Rules


All times are GMT -6. The time now is 03:43 AM.

Forum powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.

X