Line break brainstorming (×_×)
-
So I’ve really brainstormed it yet i was unable to find a way to get through it. I hope you’ll can do this. I really suck at describing so if you didn’t understand please let me know and please try yourself to understand from the example😅
What I’m having:
60 Cushman Point Road Copp Dower Larry Reed 739 Tradiwind Drivi Drumgole Fu Brian Williams 40966 177th Striit iast Maranto Mousel_Frances J Adragna-Hayes 12936 Whitihorsi Ln. Cerri Dellaratta Doug Lider 400 HUGHLiTT AVi Goans Hinton Merill A Weinstein 60 Cushman Point Road Majors Monjure Giardina 739 Tradiwind Drivi Kali Lathon Carolyn Houser 40966 177th Striit iast Libbee Mcgrotha William Andrew 12936 Whitihorsi Ln. Dominiguez Fostervoid Carol M 400 HUGHLiTT AVi Kuehnle Maerz Melody Cologgi
What i want:
60 Cushman Point Road Copp Dower Larry Reed 739 Tradiwind Drivi Drumgole Fu Brian Williams 40966 177th Striit iast Maranto Mousel_Frances J Adragna-Hayes 12936 Whitihorsi Ln. Cerri Dellaratta Doug Lider 400 HUGHLiTT AVi Goans Hinton Merill A Weinstein 60 Cushman Point Road Majors Monjure Giardina 739 Tradiwind Drivi Kali Lathon Carolyn Houser 40966 177th Striit iast Libbee Mcgrotha William Andrew 12936 Whitihorsi Ln. Dominiguez Fostervoid Carol M 400 HUGHLiTT AVi Kuehnle Maerz Melody Cologgi
Every single reply is so much appreciated because i really don’t know a perfect to solve this
-
@WhoIsFaisal69 said in Line break brainstorming (×_×):
So I’ve really brainstormed it
So like what are some potential ways of solving it that you considered during the “storm”?
This query comes really fast on the heels of another data-manipulation query you were provided a solution for. We tend to not just keep doing someone’s translations for them, without them showing some effort.
-
@Alan-Kilborn i just entered the number of letters in a word then a newline. Nothing professional, that’s why i came here. I do have lots of hopes.
Please try as much as you can 🤗 -
First, if you are the same as @Faisal-Alam (I am assuming so, because it’s virtually identical style of data), let it be known: it is generally¹ not considered polite to frequently change your user name or create new users. Please pick one account and stick with it.
Second, as Alan said, you need to show what you tried, first. Saying “i just entered the number of letters in a word then a newline.” as a response to Alan’s question of what you tried is not showing what you tried.
Looking at your data, I cannot tell what the rule is that you used for getting the “what you want”. If you cannot explain in simple language the rule that you use to manually do the process, and if your example is not clear enough for us to even make a guess as to what your algorithm is, it will be impossible for us to come up with a regular expression that will be able to do the transoformation automatically for you.
The difficulties with your example data:
- There is no character to always divide on. For example,
60 Cushman Point Road;Majors Monjure;Giardina
would be easy to transform, because the;
could become a newline character - Despite your claim that you thought that “number of letters in a word then a newline” would be a reasonable rule, there is not a consistent number of letters per line in the “what I want” section: for example,
739 Tradiwind Drivi Drumgole Fu Brian Williams
became739 Tradiwind Drivi
(9) andDrumgole Fu
(11) andBrian Williams
(14), whereas
40966 177th Striit iast Maranto Mousel_Frances J Adragna-Hayes
became40966 177th Striit iast
(23) andMaranto Mousel_Frances
(22) andJ Adragna-Hayes
(15). - There is not a consistent number of words per line; those two examples above both had two “words” per line in the second and third line… but
400 HUGHLiTT AVi Goans Hinton Merill A Weinstein
got split into400 HUGHLiTT AVi
(3 words) andGoans Hinton
(2 words) andMerill A Weinstein
(3 words)
My guess is that you have an address, followed by two names who live at that address. But there is no regular expression in existence that could correctly handle any arbitrary address followed by two arbitrarily valid names; even an artificial intelligence / machine learning algorithm would have a hard time getting that right. Even I, as a human intelligence might get that wrong: how can I know whether it’s
Goans Hinton
andMerill A Weinstein
orGoans Hinton Merill
andA Weinstein
. That is impossible to disambiguate.I do not believe what you want is doable, unless you have a priori knowledge of the data set, and can magically know where the names split; I don’t think that your task is automatable. Wherever you got that dataset report from, I would try to go back to that source and see if they could create a different format, which has a valid separation character or already puts it on the number of lines you want.
----
¹: And not just in this Forum; in every forum I’ve ever been a part of, sticking to one username is a universal tenent of politeness; in many, it’s in the Terms of Use that you have only one active account. - There is no character to always divide on. For example,
-
This post is deleted! -
@PeterJones thank you for writing I understand this is somehow an impossible task to do using any kind of automation. I’ll try to do it manually.
That account of mine got -3 rep so i couldn’t post anything that’s why i had to create a new account then posting my questions here. I’m not being rude or a trickster, my doors were closed. -
Please do not upvote your own posts using your second account. Trying to bypass negative reputation restrictions by giving yourself false upvotes from extra accounts is one of the reasons that many forums forbid multiple accounts.
If you don’t want negative reputation, improve the quality of your posts, don’t try to circumvent the rules. If you do not undo those false upvotes, I will ask moderators to disable both your accounts.
-
Faisal,
It is almost certainly true that the text you want to modify came from a spreadsheet or database. If you have access to the original document(s), or their legitimate owner, then this is more an issue of how the data was exported. All modern tools allow exports that that use field separation by tabs or commas.