Linked Questions

9
votes
1answer
2k views

How to split text without spaces into list of words? [duplicate]

What is the best approach to a problem like this in Mathematica? I can only manage this: ...
5
votes
0answers
76 views

Helping Mandy become a better speller [duplicate]

tl;dr Can you improve upon this code, which checks to see if a word can be spelled using the element symbols from the periodic table? I recently created a periodic table that lights up. The design ...
130
votes
8answers
7k views

Can one identify the design patterns of Mathematica?

... or are they unnecessary in such a high-level language? I've been thinking about programming style, coding standards and the like quite a bit lately, the result of my current work on a mixed .Net/...
48
votes
2answers
2k views

Granular versus terse coding

While reading Leonid's grand answers to General strategies to write big code in Mathematica? I came across something that goes against my own practices. I do not disagree with the principle but the ...
36
votes
3answers
2k views

Can a Trie be implemented efficiently?

What is the most space and time efficient way to implement a Trie in Mathematica? Will it be practically faster than what is natively available in appropriate cases?
8
votes
3answers
2k views

Finding all sublists or substrings of a given list/string

Given a list or string, how do I get a list of all (contiguous) sublists/substrings? The order is not important. Example for lists: ...
14
votes
2answers
513 views

Split a Unicode string maintaining uppercase characters

I want to split a string according to a predefined set of substrings (lowercase), though the actual text can contain uppercase characters anyplace. The task is to find the matches, longer preferred ...
7
votes
2answers
611 views

How to I extract the element name of a chemical compound in a string?

Say I have a compound Fe3O4, and I want to separate the name of elements and number. The code I write for separate number is ...
4
votes
3answers
219 views

Find prefix of list in Association

I am trying to write some kind of demonstration for coding algorithm (for prefix codes). I have an Association that contains lists of bits (0s and 1s): ...
5
votes
2answers
213 views

Split up word pairs in string based on semantic textual analysis

I have several hundred sentence-strings with joined words. They were extracted from a text (and are in sequence). Here is an example of one: ...
3
votes
1answer
175 views

Generating prime factorizations from an integer's digits by inserting * and ^ into the digit sequence

Problem Given a positive integer, output all possible valid prime-factorization "statements" thereof created by inserting zero or more multiplication (*) symbols and zero or more power (^) symbols ...