Items tagged with stringtools stringtools Tagged Items Feed

We have two texts in a certain language, represented as Maple  strings,  e. g.
"die einkommen der landwirte sind fuer die abgeordneten ein
buch mit sieben siegeln um dem abzuhelfen muessen dringend alle
subventionsgesetze verbessert werden" and
"die steuern auf vermoegen und einkommen sollten nach meinung
der abgeordneten nachdruecklich erhoben werden dazu muessen die
kontrollbefugnisse der finanzbehoerden dringend verbessert werden".
We have to find the maximal common subsequence of the words in the both texts,
i.e. "die  einkommen der abgeordneten muessen dringend verbessert werden" for
the above. If there are a few such ones, then only one is enough. How to program
that by SringTools and/or EssayTools in maximum efficient way? A compiled procedure is welcome.

Hello..
 i have big problem, i dont know, how to add 0 in front.
firstly, i convert decimal to binary and  then i convert to string

but, how i add some 0 in front??
for exmple below..

list:=["1000","1","1110"]

i want to look like 7 bit
["0001000","0000001","0001110"]

i dont know how to count all digit, and how to add some 0 to front , and also have 7 bit?

I have a message, "I Didn't See That Double Rainbow!" and i want to encrypt it by making all the characters UpperCase first and removing all punctuation. I used IsUpper to remove the punctuation. Now I want to separate my new scrambled message into BLOCKS OF 5 LETTERS SEPARATED BY SPACES. Any ideas on how to do that using the "printf" command?

 

with(StringTools):
Alphabet:="THEQUICKBROWNFXJMPSVLAZYDG";
        ...

Several months ago, I'd posted a two-letter-words quiz and a two-to-make-three quiz meant for fans of the Scrabble game. Here is a third worksheet that tests your ability to find anagrams of seven-letter words. The worksheet is structured around six-letter stems and the lists of seven-letter...

In a string, how can I find a letter of both upper and lower case?

ie/ something like

StringTools[SearchAll]("h" and "H" , string)

Some time ago, I posted a two-letter-words quiz for Scrabble players. That one is particularly useful to beginner players wanting to increase their scoring opportunities. I've created another worksheet for those looking for a greater challenge. This one tests your knowledge of the three-letter words that can be created from the valid two-letter words. Enjoy!

Many years ago, I played Scrabble competitively. One of the first things a beginner tournament player should do is learn the two-letter word list. Recently, I created a worksheet that tests your knowledge of all the valid two-letter words accepted in official tournament play in North America. The worksheet makes extensive use of the StringTools package which has terrific tools for manipulating words.

The worksheet link is below if you'd like to try it out, and I'll...

Hello

I need a procedure to unjumble a series of 9 letters into discernable 4 to 9 letter words. each letter can only be used once and it needs to include a given letter in each word. eg IOCMRELAE, and include R in each word

Acer did a similar thing a while back, but in this case it needs to tell it to permute 9 letters, then 8,....,then 4 (each including letter R).

 >with(StringTools): with(PatternDictionary):
>bid:= Create(`builtin`):

restart:
with(StringTools):
Length("fc2c-cEImI0Qb1I#YZTdh7JyQ%3t#eUW7W,5,CMjUV/\WHv\rEYNLrBlkETbsy+");
                               61
Length("fc2c-cEImI0Qb1I#YZTdh7JyQ%3t#eUW7W,5,CMjUV/WHvrEYNLrBlkETbsy+");
                               61

I expect the first call to Length to return a value of 63.  The backslashes are being ignored.  Is this a "feature", or is the Length command not behaving as it should?

Another feature added to Maple 15 partially in response to the MaplePrimes forums is the new/improved ?HTTP package.  It provides one-step commands for fetching data from the web: much simpler than using the ?Sockets package directly. In most cases, the command ?HTTP,Get is what you would use:

 (s, page, h) := HTTP:-Get("http://en.wikipedia.org/wiki/List_of_Crayola_crayon_colors"):

The above fetches the HTML source of a page from Wikipedia and stores it as a string 'page'. The other two outputs are 's', and integer HTTP status code and 'h' a table of the headers returned in the HTTP response from the server.  Compare this to the amount of code needed to fetch data in my Baby Names application for Maple 12, for example.

I was recently asked a question on using regular expressions with ?type , and I thought it was interesting enough, to share here.

Page 1 of 1