I wrote:
Each pattern can be either specified for data extraction or to restrict the occurrence of nested patterns.
If the pattern is (was or has been ?) specified for data extraction, we extract its content...
I used "be specified for something" to mean the purpose of each pattern, is it a correct usage of "specify"? What are other ways to say such sentences?