AnsweredAssumed Answered

Searching for a module in Alfresco for my research.

Question asked by sphinks on Dec 4, 2011
Latest reply on Dec 7, 2011 by mrogers

I`m coming to this forum with not usual topic. I`m a post-graduate student and I complete my research work that connected with Markovproductions. To complete my work I should show that my reseach can be applied to real project (of course it doesnt mean that this project will use it in real, just as possibility) and the project should be connected with management systems. So I start to look into Alfresco hoping to find suitable part in it. But source codes are very huge and I`am looking it throught not so fast as I think before. So I want to ask you for some help - may be someone can show me the part of code, what will be suitable for my research work. So I show what my work connected with.
Markov production is a expression like:

ab - > cd

When it work over the string it replace all occurences of 'ab' to 'cd'. That simple, as replaceAll in java. But there a difference: after every change we shoold to look word we working with from very begining. Why? I`ll show. Image we have a production:

ab -> bc

and we want to process word.


Ok. what we will do: find first 'ab' and change it to 'bc' and get:


As you can see we get one more 'ab' that wasn`t in first word. If we at this moment don`t go back to begining of word we will get word with 'ab' in it. But it`s wrong because Markov production should change ALL occurences of 'ab'. That`s why after every change production start its work from begin of word.
So my research give the opportunity to replace all ocurences in on pass making a special form of production, that in runtime can be modified to a form like this:

aab -> bbc (for the example above)

If we get new occurence we can in runtime generate ab -> bc, abb -> bbc, abbb -> bbbc and so on.

Of course in usual strings we don`t often get such combination with triple 'b' or any other letter. But we can think instead of letters in bytes or even bits in there we can get any combinations of '1' and '0'.

I take a llok in source code and find in utils encode converter. This is a good example of Markov production in our usual programms. We change codes of one letter in one encode to another encode. Something like this can be write in Markov production something like this:

byte(64) -> /u00AF (I take random codes, so don`t be confused with it) In this production we replace all ocurences of code '64' to its unicode analog. Any converter or translator is a good example of work Markov prodution, but in my case it`s not suitable, because in such cases we goes from one laguage (encode) to another. Different laguages in real life cann`t get mixed phrases in Markov production, usualy we have only symbols of this or another languages on left or right part of production, but not mixes. So for my research I search some string work in same laguage where I can apply my accelerations or some byte or bit works (all bytes 0-255 is also language, and all bits 0,1 - are also language).

So can anyone give a peace of advise what part of Alfresco code I should dive in?